2011-04-11 Simon Fraser <simon.fraser@apple.com>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-04-11  Simon Fraser  <simon.fraser@apple.com>
2
3         Reviewed by Dan Bernstein.
4
5         Divide by zero in calcColumnWidth
6         https://bugs.webkit.org/show_bug.cgi?id=58230
7
8         Test: fast/multicol/huge-column-count.html
9         
10         Make sure we have at least one column, to avoid divide by zero.
11
12         * rendering/RenderBlock.cpp:
13         (WebCore::RenderBlock::calcColumnWidth):
14
15 2011-04-09  Gavin Barraclough  <barraclough@apple.com>
16
17         Reviewed by Sam Weinig.
18
19         Bug 58198 - Clean up JSValue implementation for JSVALUE64
20
21         JSNumberCell.h has been deprecated.
22
23         * ForwardingHeaders/runtime/JSNumberCell.h: Removed.
24         * bindings/scripts/CodeGeneratorJS.pm:
25         * bridge/c/c_instance.cpp:
26
27 2011-04-11  Dan Bernstein  <mitz@apple.com>
28
29         Build fix.
30
31         * html/canvas/CanvasRenderingContext2D.cpp:
32         (WebCore::CanvasRenderingContext2D::State::State):
33
34 2011-04-11  Antti Koivisto  <antti@apple.com>
35
36         Reviewed by Tony Gentilcore.
37
38         Document source preload scanned repeatedly
39         https://bugs.webkit.org/show_bug.cgi?id=58123
40         
41         Don't clear the preload scanner after execution resumes. This would lose the current
42         scanning point and lead to rescanning when the preload scanner would get reconstructed
43         due to main parser blocking again.
44
45         Instead clear the scanner only in the specific case of receiving new data while the main
46         parser has already reached the end of the current input.
47
48         Also switched to using isWaitingForScripts() instead of m_treeBuilder->isPaused() for consistency.
49
50         The case the clearing in resumeParsingAfterScriptExecution() was added for is covered by 
51         http/tests/loading/preload-slow-loading.php.
52
53         * html/parser/HTMLDocumentParser.cpp:
54         (WebCore::HTMLDocumentParser::insert):
55         (WebCore::HTMLDocumentParser::append):
56         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
57
58 2011-04-11  Dan Bernstein  <mitz@apple.com>
59
60         Build fix.
61
62         * html/canvas/CanvasRenderingContext2D.cpp:
63         (WebCore::CanvasRenderingContext2D::State::State):
64
65 2011-04-11  Dan Bernstein  <mitz@apple.com>
66
67         Reviewed by Alexey Proskuryakov.
68
69         Assertion failure in CanvasRenderingContext2D::State::fontsNeedUpdate when invalidating the font cache after opening canvas/philip/tests/initial.reset.2dstate.html (occurs on Qt debug test bot)
70         https://bugs.webkit.org/show_bug.cgi?id=58229
71
72         * html/canvas/CanvasRenderingContext2D.cpp:
73         (WebCore::CanvasRenderingContext2D::State::State): Added copy constructor, to register the copy with
74         the font selector if needed.
75         (WebCore::CanvasRenderingContext2D::State::operator=): Added assignment constructor, to handle
76         registration with the font selector as needed.
77         * html/canvas/CanvasRenderingContext2D.h:
78
79 2011-04-11  Mario Sanchez Prada  <msanchez@igalia.com>
80
81         Reviewed by Chris Fleizach.
82
83         [GTK] ARIA tables not exposing cells as HTML tables do
84         https://bugs.webkit.org/show_bug.cgi?id=57463
85
86         Expose cells for ARIA grids consistently with HTML tables in GTK,
87         keeping the same behaviour for the other platforms.
88
89         * accessibility/AccessibilityARIAGrid.cpp:
90         (WebCore::AccessibilityARIAGrid::addChild): Add the row's children
91         to the accessibility hierarchy when accessibility objects for rows
92         are ignoring accessibility, otherwise add the row.
93         (WebCore::AccessibilityARIAGrid::addChildren): Do not check at
94         this point whether every child of the table ignores or not
95         accessibility, letting addChild() make the proper decision later.
96
97         * accessibility/AccessibilityARIAGridCell.cpp:
98         (WebCore::AccessibilityARIAGridCell::parentTable): Consider that
99         rows could be ignoring accessibility, hence the parent could be
100         retrieved in the first call to parentObjectUnignored().
101         (WebCore::AccessibilityARIAGridCell::rowIndexRange): Ditto.
102         (WebCore::AccessibilityARIAGridCell::columnIndexRange): Ditto..
103
104         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
105         (atkRole): Map ColumnHeader and RowHeader to ATK_ROLE_TABLE_CELL.
106
107 2011-04-11  Sergio Villar Senin  <svillar@igalia.com>
108
109         Reviewed by Martin Robinson.
110
111         [GTK] Fix make distcheck
112         https://bugs.webkit.org/show_bug.cgi?id=58224
113
114         Removed a file that is no longer in the source tree.
115
116         * GNUmakefile.list.am:
117
118 2011-04-11  Dimitri Glazkov  <dglazkov@chromium.org>
119
120         Reviewed by Martin Robinson.
121
122         REGRESSION(r83397): Most GTK media controls are hidden when no valid source is specified
123         https://bugs.webkit.org/show_bug.cgi?id=58204
124
125         Covered by existing tests.
126
127         * platform/gtk/RenderThemeGtk.h:
128         (WebCore::RenderThemeGtk::hasOwnDisabledStateHandlingFor): Let GTK handle
129             the the state of media controls.
130
131 2011-04-11  Dimitri Glazkov  <dglazkov@chromium.org>
132
133         Remove obsolete comment, which was mistakenly landed in r83397.
134
135         Though potentially a work of art, the comment lost its functional meaning a long time ago.
136
137         * html/shadow/MediaControls.cpp:
138         (WebCore::MediaControls::create): Removed comment.
139
140 2011-04-05  Hans Wennborg  <hans@chromium.org>
141
142         Reviewed by Steve Block.
143
144         IndexedDB: Introduce skeleton for LevelDB backend
145         https://bugs.webkit.org/show_bug.cgi?id=57827
146
147         No new tests: no new functionality (yet).
148
149         * WebCore.gyp/WebCore.gyp:
150             Add dependency on leveldb when ENABLE_LEVELDB=1 in feature_defines.
151         * WebCore.gypi:
152             Add new files.
153         * storage/IDBBackingStore.h:
154         (WebCore::IDBBackingStore::ObjectStoreRecordIdentifier::~ObjectStoreRecordIdentifier):
155             Introduce abstract type ObjectStoreRecordIdentifier. The SQLite
156             backend uses integers to refer to a specific row in a table, but
157             the LevelDB backend will use something else.
158         * storage/IDBDatabaseBackendImpl.cpp:
159         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
160         (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
161         (WebCore::IDBDatabaseBackendImpl::deleteObjectStoreInternal):
162         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
163             Change functions to pass along the database id for operations that
164             concern object stores. We want to be able to group object stores
165             ids per database.
166         * storage/IDBFactoryBackendImpl.cpp:
167         (WebCore::IDBFactoryBackendImpl::open):
168             Decide which backend to use based on the backingStoreType
169             parameter.
170         * storage/IDBIndexBackendImpl.cpp:
171         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
172         (WebCore::IDBIndexBackendImpl::openCursorInternal):
173         (WebCore::IDBIndexBackendImpl::getInternal):
174         (WebCore::IDBIndexBackendImpl::addingKeyAllowed):
175         * storage/IDBIndexBackendImpl.h:
176         (WebCore::IDBIndexBackendImpl::create):
177             Pass database and object store id to backend functions concerning
178             indexes.
179         * storage/IDBLevelDBBackingStore.cpp: Added.
180         (WebCore::IDBLevelDBBackingStore::IDBLevelDBBackingStore):
181         (WebCore::IDBLevelDBBackingStore::~IDBLevelDBBackingStore):
182         (WebCore::IDBLevelDBBackingStore::open):
183         (WebCore::IDBLevelDBBackingStore::extractIDBDatabaseMetaData):
184         (WebCore::IDBLevelDBBackingStore::setIDBDatabaseMetaData):
185         (WebCore::IDBLevelDBBackingStore::getObjectStores):
186         (WebCore::IDBLevelDBBackingStore::createObjectStore):
187         (WebCore::IDBLevelDBBackingStore::deleteObjectStore):
188         (WebCore::IDBLevelDBBackingStore::getObjectStoreRecord):
189         (WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
190         (WebCore::IDBLevelDBBackingStore::clearObjectStore):
191         (WebCore::IDBLevelDBBackingStore::deleteObjectStoreRecord):
192         (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
193         (WebCore::IDBLevelDBBackingStore::keyExistsInObjectStore):
194         (WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord):
195         (WebCore::IDBLevelDBBackingStore::getIndexes):
196         (WebCore::IDBLevelDBBackingStore::createIndex):
197         (WebCore::IDBLevelDBBackingStore::deleteIndex):
198         (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
199         (WebCore::IDBLevelDBBackingStore::deleteIndexDataForRecord):
200         (WebCore::IDBLevelDBBackingStore::getObjectViaIndex):
201         (WebCore::IDBLevelDBBackingStore::getPrimaryKeyViaIndex):
202         (WebCore::IDBLevelDBBackingStore::keyExistsInIndex):
203         (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
204         (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
205         (WebCore::IDBLevelDBBackingStore::openIndexCursor):
206         (WebCore::IDBLevelDBBackingStore::createTransaction):
207         * storage/IDBLevelDBBackingStore.h: Added.
208             Add an empty implementation of the LevelDB backend.
209         * storage/IDBObjectStoreBackendImpl.cpp:
210             Keep track of database id, use the new RecordIdentifier.
211         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
212         (WebCore::IDBObjectStoreBackendImpl::getInternal):
213         (WebCore::IDBObjectStoreBackendImpl::putInternal):
214         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
215         (WebCore::IDBObjectStoreBackendImpl::clearInternal):
216         (WebCore::populateIndex):
217         (WebCore::IDBObjectStoreBackendImpl::createIndex):
218         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
219         (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal):
220         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
221         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
222         (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
223         * storage/IDBObjectStoreBackendImpl.h:
224         (WebCore::IDBObjectStoreBackendImpl::create):
225         (WebCore::IDBObjectStoreBackendImpl::databaseId):
226         * storage/IDBSQLiteBackingStore.cpp:
227         (WebCore::IDBSQLiteBackingStore::open):
228         (WebCore::IDBSQLiteBackingStore::createObjectStore):
229         (WebCore::IDBSQLiteBackingStore::deleteObjectStore):
230         (WebCore::IDBSQLiteBackingStore::getObjectStoreRecord):
231         (WebCore::IDBSQLiteBackingStore::putObjectStoreRecord):
232         (WebCore::IDBSQLiteBackingStore::clearObjectStore):
233         (WebCore::IDBSQLiteBackingStore::deleteObjectStoreRecord):
234         (WebCore::IDBSQLiteBackingStore::nextAutoIncrementNumber):
235         (WebCore::IDBSQLiteBackingStore::keyExistsInObjectStore):
236         (WebCore::IDBSQLiteBackingStore::forEachObjectStoreRecord):
237         (WebCore::IDBSQLiteBackingStore::getIndexes):
238         (WebCore::IDBSQLiteBackingStore::createIndex):
239         (WebCore::IDBSQLiteBackingStore::deleteIndex):
240         (WebCore::IDBSQLiteBackingStore::putIndexDataForRecord):
241         (WebCore::IDBSQLiteBackingStore::deleteIndexDataForRecord):
242         (WebCore::IDBSQLiteBackingStore::getObjectViaIndex):
243         (WebCore::IDBSQLiteBackingStore::getPrimaryKeyViaIndex):
244         (WebCore::IDBSQLiteBackingStore::keyExistsInIndex):
245         (WebCore::IDBSQLiteBackingStore::openObjectStoreCursor):
246         (WebCore::IDBSQLiteBackingStore::openIndexKeyCursor):
247         (WebCore::IDBSQLiteBackingStore::openIndexCursor):
248         * storage/IDBSQLiteBackingStore.h:
249
250 2011-04-11  Alexander Pavlov  <apavlov@chromium.org>
251
252         Reviewed by Yury Semikhatsky.
253
254         Web Inspector: Duplicate CSS properties are reported for non-lowercase property names in the Styles sidebar
255         https://bugs.webkit.org/show_bug.cgi?id=58226
256
257         * inspector/InspectorStyleSheet.cpp:
258         (WebCore::InspectorStyle::populateAllProperties):
259
260 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
261
262         Reviewed by Pavel Feldman.
263
264         Web Inspector: get rid of source frame delegates for resources panel.
265         https://bugs.webkit.org/show_bug.cgi?id=58041
266
267         Use TextViewer configured with a domain-specific delegate to show/edit resource contents in resources panel.
268
269         * inspector/front-end/ResourceView.js:
270         (WebInspector.ResourceView.createResourceView):
271         (WebInspector.ResourceView.resourceViewTypeMatchesResource):
272         (WebInspector.ResourceSourceFrame):
273         (WebInspector.ResourceSourceFrame.prototype.get resource):
274         (WebInspector.ResourceSourceFrame.prototype.contentEditable):
275         (WebInspector.ResourceSourceFrame.prototype._requestContent):
276         (WebInspector.CSSSourceFrame):
277         (WebInspector.CSSSourceFrame.prototype.contentEditable):
278         (WebInspector.CSSSourceFrame.prototype._editContent):
279         (WebInspector.CSSSourceFrame.prototype._editContent.handleInfos):
280         (WebInspector.CSSSourceFrame.prototype._saveStyleSheet):
281         * inspector/front-end/SourceFrame.js:
282         (WebInspector.SourceFrame.prototype._ensureContentLoaded):
283         (WebInspector.SourceFrame.prototype._requestContent):
284         (WebInspector.SourceFrame.prototype._handleSave):
285         (WebInspector.SourceFrame.prototype._editContent):
286
287 2011-04-11  Alexis Menard  <alexis.menard@openbossa.org>
288
289         Reviewed by Andreas Kling.
290
291         [Qt] Regression : r83051 Oxygen's lineedits are not rendered properly
292         https://bugs.webkit.org/show_bug.cgi?id=58076
293
294         State_Sunken is more generic than pressed. It is used by items such as frames or
295         line edits because they are "sunken" frames (e.g. QLineEdit). It can be required
296         by some style like Oxygen. Therefore only in the mobile theme we check if the object
297         is pressed.
298
299         * platform/qt/RenderThemeQt.cpp:
300         (WebCore::RenderThemeQt::paintTextField):
301
302 2011-04-11  Pavel Feldman  <pfeldman@chromium.org>
303
304         Reviewed by Yury Semikhatsky.
305
306         Web Inspector: add support for optional output parameters.
307         https://bugs.webkit.org/show_bug.cgi?id=58207
308
309         Output parameters such as "redirectResponse" are optional, but
310         do not allow specifying them as such.
311
312         * inspector/CodeGeneratorInspector.pm:
313         * inspector/Inspector.json:
314         * inspector/InspectorResourceAgent.cpp:
315         (WebCore::buildObjectForResourceResponse):
316         (WebCore::buildObjectForCachedResource):
317         * inspector/front-end/NetworkManager.js:
318         (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
319         * inspector/generate-inspector-idl:
320
321 2011-04-11  Pavel Feldman  <pfeldman@chromium.org>
322
323         Reviewed by Yury Semikhatsky.
324
325         Web Inspector: refactor / document call frames in debugger domain.
326         https://bugs.webkit.org/show_bug.cgi?id=58187
327
328         Note that we are not special casing with(element) and with(document) anymore
329         and do not tell user that it is "Event target" and "Event document". Strictly speaking,
330         we should not have done it for with(element) not necessarily being related to an event.
331
332         * English.lproj/localizedStrings.js:
333         * inspector/InjectedScriptSource.js:
334         * inspector/Inspector.json:
335         * inspector/front-end/ScopeChainSidebarPane.js:
336         (WebInspector.ScopeChainSidebarPane.prototype.update):
337
338 2011-04-10  ChangSeok Oh  <shivamidow@gmail.com>
339
340         Reviewed by Eric Seidel.
341
342         Make correspondence of file name related with event to other port.
343         https://bugs.webkit.org/show_bug.cgi?id=57416
344
345         Some file names are changed to make correspondence naming rule.
346         Keyboard, mouse and wheel event file names for GTK port have been different from other ports.
347         This has made user hard to find a specific file related with event for GTK port. 
348
349         No test required. This patch just changes some file names.
350
351         * GNUmakefile.list.am:
352         * platform/gtk/KeyEventGtk.cpp: Removed.
353         * platform/gtk/MouseEventGtk.cpp: Removed.
354         * platform/gtk/PlatformKeyboardEventGtk.cpp: Added.
355         * platform/gtk/PlatformMouseEventGtk.cpp: Added.
356         * platform/gtk/PlatformWheelEventGtk.cpp: Added.
357         * platform/gtk/WheelEventGtk.cpp: Removed.
358
359 2011-04-10  Simon Fraser  <simon.fraser@apple.com>
360
361         Revert the FloatRect.cpp part of r83422, since
362         clampToInteger() is broken for some inputs. I filed
363         https://bugs.webkit.org/show_bug.cgi?id=58216
364
365         * platform/graphics/FloatRect.cpp:
366         (WebCore::safeFloatToInt):
367         (WebCore::enclosingIntRect):
368
369 2011-04-10  Simon Fraser  <simon.fraser@apple.com>
370
371         Reviewed by Maciej Stachowiak.
372
373         Car model dropdowns at audiusa.com lay out incorrectly with compositing enabled
374         https://bugs.webkit.org/show_bug.cgi?id=56660
375         
376         When overflow on an element changes, we need to inform compositing
377         layers which create and position an "ancestor clipping" layer based
378         on that overflow. Do this by triggering a rebuild of compositing layers
379         when overflow changes on a layer whose stacking context has compositing
380         descendants. (We can't just check whether the layer itself has compositing
381         descendants, because overflow follows the render tree, but compositing
382         follows the z-order tree.)
383
384         Test: compositing/geometry/ancestor-overflow-change.html
385
386         * rendering/RenderLayer.cpp:
387         (WebCore::RenderLayer::styleChanged):
388         * rendering/RenderLayer.h:
389         * rendering/RenderLayerBacking.cpp:
390         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
391
392 2011-04-10  Simon Fraser  <simon.fraser@apple.com>
393
394         Reviewed by Ariya Hidayat.
395
396         Allow ShadowBlur to re-use the last buffer if it already contains the correct shadow
397         https://bugs.webkit.org/show_bug.cgi?id=58161
398         
399         ShadowBlur already has a singleton scratch buffer that is re-used
400         between shadows. Enhance use of this scratch buffer to avoid drawing
401         and blurring the shadow if the results will match what is already
402         in the buffer.
403         
404         Cleaned up ShadowBlur code to remove beginShadowLayer() and endShadowLayer(),
405         which ended up with little reusable code after adding the re-use logic.
406
407         * platform/graphics/FloatRect.cpp:
408         (WebCore::enclosingIntRect): Replace safeFloatToInt() with the existing
409         clampToInteger() from MathExtras.h
410         
411         * platform/graphics/FloatSize.h:
412         (WebCore::expandedIntSize): New method to safely ceil() the size.
413         
414         * platform/graphics/RoundedIntRect.h:
415         Add operator== for Radii and RoundedIntRect.
416
417         * platform/graphics/ShadowBlur.cpp:
418         (WebCore::ScratchBuffer::ScratchBuffer):
419         (WebCore::ScratchBuffer::setLastShadowValues):
420         (WebCore::ScratchBuffer::setLastInsetShadowValues):
421         (WebCore::ScratchBuffer::matchesLastShadow):
422         (WebCore::ScratchBuffer::matchesLastInsetShadow):
423         (WebCore::ScratchBuffer::clearScratchBuffer):
424         Have the scratch buffer remember what shadow parameters were used
425         to render the buffer contents.
426         
427         (WebCore::ShadowBlur::drawShadowBuffer):
428         Renamed from endShadowLayer(), and only contains the drawing
429         logic now.
430         
431         (WebCore::ShadowBlur::drawRectShadow):
432         Promote some code from beginShadowLayer().
433         
434         (WebCore::ShadowBlur::drawInsetShadow):
435         Promote some code from beginShadowLayer().
436
437         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
438         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
439         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
440         (WebCore::ShadowBlur::drawRectShadowWithTiling):
441         These methods now check to see if the buffer already matches
442         their required parameters, and avoid work if it does.
443         
444         (WebCore::ShadowBlur::blurShadowBuffer):
445         Factored some code into this new method.
446         
447         (WebCore::ShadowBlur::blurAndColorShadowBuffer):
448         Minor refactoring.
449
450         * platform/graphics/ShadowBlur.h:
451
452 2011-04-10  Geoffrey Garen  <ggaren@apple.com>
453
454         Build fix: Updated for file move.
455
456         * bindings/js/GCController.cpp:
457         * bindings/js/ScriptGCEvent.cpp:
458
459 2011-04-10  Geoffrey Garen  <ggaren@apple.com>
460
461         Rubber-stamped by Beth Dakin.
462
463         Moved Heap.h and Heap.cpp to the heap folder, because anything less 
464         would be uncivilized.
465
466         * ForwardingHeaders/heap/Heap.h: Copied from WebCore/ForwardingHeaders/runtime/Heap.h.
467         * ForwardingHeaders/runtime/Heap.h: Removed.
468
469 2011-04-10  Luke Macpherson   <macpherson@chromium.org>
470
471         Reviewed by Simon Fraser.
472
473         Rename CSSStyleApplyProperty::inherit,initial,value applyInheritValue,applyInitialValue,applyValue
474         https://bugs.webkit.org/show_bug.cgi?id=58212
475
476         No new tests - function renaming only / no functionality changes.
477
478         * css/CSSStyleApplyProperty.cpp:
479         Rename all instances of inherit, initial and value.
480         * css/CSSStyleApplyProperty.h:
481         Rename all instances of inherit, initial and value.
482         * css/CSSStyleSelector.cpp:
483         Rename all instances of inherit, initial and value.
484
485 2011-04-10  Mike Lawther  <mikelawther@chromium.org>
486
487         Reviewed by Ojan Vafai.
488
489         flex/bison tokens and grammar for CSS calc
490         https://bugs.webkit.org/show_bug.cgi?id=54412
491
492         Tests: css3/calc/calc-errors.html
493                css3/calc/lexer-regression-57581-2.html
494                css3/calc/lexer-regression-57581-3.html
495                css3/calc/lexer-regression-57581.html
496                css3/calc/minmax-errors.html
497                css3/calc/nested-rounded-corners.html
498                css3/calc/simple-calcs.html
499                css3/calc/simple-minmax.html
500
501         * css/CSSGrammar.y:
502         * css/CSSParserValues.cpp:
503         (WebCore::CSSParserValueList::insertValueAt):
504         (WebCore::CSSParserValueList::extend):
505         * css/CSSParserValues.h:
506         * css/tokenizer.flex:
507
508 2011-04-10  Alice Boxhall  <aboxhall@chromium.org>
509
510         Reviewed by Ryosuke Niwa.
511
512         Change EventHandler::updateSelectionForMouseDrag to take a HitTestResult only.
513         https://bugs.webkit.org/show_bug.cgi?id=57923
514
515         Change EventHandler::updateSelectionForMouseDrag to take a HitTestResult
516         rather than a Node* and an IntPoint&, as the selection may actually not
517         extend into the Node found by the HitTest.
518
519         No new tests. Refactoring only.
520
521         * page/EventHandler.cpp:
522         (WebCore::EventHandler::handleMouseDraggedEvent):
523         (WebCore::EventHandler::updateSelectionForMouseDrag):
524         * page/EventHandler.h:
525
526 2011-04-10  Kent Tamura  <tkent@chromium.org>
527
528         Unreviewed, rolling out r83353.
529         http://trac.webkit.org/changeset/83353
530         https://bugs.webkit.org/show_bug.cgi?id=58106
531
532         The new test doesn't pass on all Chromium platforms.
533
534         * dom/DataTransferItem.h:
535         * dom/DataTransferItem.idl:
536         * platform/chromium/ClipboardMimeTypes.cpp:
537         * platform/chromium/ClipboardMimeTypes.h:
538         * platform/chromium/DataTransferItemChromium.cpp:
539         (WebCore::DataTransferItemChromium::getAsString):
540         * platform/chromium/DataTransferItemChromium.h:
541         * platform/chromium/PlatformBridge.h:
542
543 2011-04-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
544
545         Reviewed by Eric Carlson.
546
547         [EFL] Add seek forward / backward buttons to MediaControl UI.
548         https://bugs.webkit.org/show_bug.cgi?id=56810
549
550         Add seek forward / backward buttons to media control. And, change formType name
551         for media control.
552
553         * platform/efl/RenderThemeEfl.cpp:
554         (WebCore::RenderThemeEfl::edjeGroupFromFormType):
555         (WebCore::RenderThemeEfl::emitMediaButtonSignal):
556         (WebCore::RenderThemeEfl::paintMediaMuteButton):
557         (WebCore::RenderThemeEfl::paintMediaPlayButton):
558         (WebCore::RenderThemeEfl::paintMediaSeekBackButton):
559         (WebCore::RenderThemeEfl::paintMediaSeekForwardButton):
560         * platform/efl/RenderThemeEfl.h:
561
562 2011-04-10  Chris Guillory  <chris.guillory@google.com>
563
564         Reviewed by Eric Seidel.
565
566         Remove unused function declaration in PlatformContextSkia.h.
567         https://bugs.webkit.org/show_bug.cgi?id=55983
568
569         * platform/graphics/skia/PlatformContextSkia.h:
570
571 2011-04-10  Patrick Gansterer  <paroga@webkit.org>
572
573         Unreviewed build fix for !ENABLE(XSLT) after r82562.
574
575         * dom/XMLDocumentParserLibxml2.cpp:
576         (WebCore::XMLDocumentParser::doEnd):
577
578 2011-04-10  Patrick Gansterer  <paroga@webkit.org>
579
580         Unreviewed build fix for !ENABLE(XSLT) after r82562.
581
582         * xml/XMLTreeViewer.cpp: Readded #if ENABLE(XSLT).
583
584 2011-04-10  Dimitri Glazkov  <dglazkov@chromium.org>
585
586         Reviewed by Anders Carlsson.
587
588         REGRESSION(r83256): Text-decoration bleeds into shadow DOM
589         https://bugs.webkit.org/show_bug.cgi?id=58205
590
591         Now that the shadow root is a never-styled element, we need to walk to
592         parent to find out if we're inside of a shadow DOM subtree.
593
594         Test: media/controls-styling.html
595
596         * css/CSSStyleSelector.cpp:
597         (WebCore::isAtShadowBoundary): Added helper function.
598         (WebCore::CSSStyleSelector::adjustRenderStyle): Changed to use the helper.
599
600 2011-04-07  Dimitri Glazkov  <dglazkov@chromium.org>
601
602         Reviewed by Eric Carlson.
603
604         [Meta] Convert HTMLMediaElement to use the new shadow DOM
605         https://bugs.webkit.org/show_bug.cgi?id=53020
606
607         This conversion is non-trivial, for several reasons:
608
609         1) Since HTMLMediaElement now hosts the shadow DOM for controls, hiding
610         and showing controls does not result in destroying and re-creating the
611         shadow DOM tree. Instead, the tree is created as needed and shown/hidden
612         using inline styles.
613         
614         2) Instead of detaching/attaching on each style change, the control parts
615         are now using a set of higher fidelity callbacks that notify MediaControls
616         about changes to which it should react. Each reaction results in hiding,
617         showing, or changing the state of the control parts using inline styles
618         and DOM APIs.
619
620         3) Hiding and showing controls is accomplished using inline styles, rather
621         than wiring rendererIsNeeded, because renderers are now re-created less
622         frequently.
623
624         4) Instead of constantly querying RenderTheme about visibility of a particular
625         control part, we let the theme determine which parts are supported and
626         which parts are visible in certain conditions.
627
628         5) Custom hit-testing, event forwarding, and style updates are completely
629         removed, since they are now unnecessary.
630
631         6) Fading controls in/out is now done as CSS animation, since shadow DOM
632         supports it.
633
634         Test: manual-tests/media-controls.html
635
636 2011-04-09  Dan Bernstein  <mitz@apple.com>
637
638         Reviewed by Beth Dakin.
639
640         <rdar://problem/9215280> Detached canvas draws with incorrect font
641
642         Test: fast/canvas/font-update.html
643
644         The existing mechanism for updating the font in a canvas 2D context was lacking in at least
645         two ways: it neglected to update fonts in all but the topmost state in the stack, and since it
646         was based on HTMLCanvasElemen's attach() and recalcStyle(), it did not work when the element
647         was not attached.
648
649         This change takes the responsibility for font updates away from the canvas element and gives it
650         to the canvas context and its graphics state.
651
652         * css/CSSFontSelector.cpp:
653         (WebCore::CSSFontSelector::registerForInvalidationCallbacks): Added. Adds to the set of registered
654         font selector clients.
655         (WebCore::CSSFontSelector::unregisterForInvalidationCallbacks): Added. Removes from the set of
656         registered font selector clients.
657         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks): Calls fontsNeedUpdate() on all registered
658         clients and forces a style recalc on the document.
659         (WebCore::CSSFontSelector::fontLoaded): Changed to call dispatchInvalidationCallbacks().
660         (WebCore::CSSFontSelector::fontCacheInvalidated): Ditto.
661         * css/CSSFontSelector.h:
662         * html/HTMLCanvasElement.cpp: Removed overrides of attach() and recalcStyle().
663         * html/HTMLCanvasElement.h:
664         * html/canvas/CanvasRenderingContext2D.cpp:
665         (WebCore::CanvasRenderingContext2D::State::~State): Added. Unregisters with the font selector.
666         (WebCore::CanvasRenderingContext2D::State::fontsNeedUpdate): Added. Called by the font selector
667         when its fonts need to be updated. Updates the font.
668         (WebCore::CanvasRenderingContext2D::setFont): Registers the state with the font selector.
669         * html/canvas/CanvasRenderingContext2D.h:
670         * platform/graphics/FontSelector.h:
671         (WebCore::FontSelectorClient::~FontSelectorClient):
672
673 2011-04-09  Geoffrey Garen  <ggaren@apple.com>
674
675         Not reviewed.
676
677         Try recommitting some things svn left out of my last commit.
678
679         * bridge/qt/qt_runtime.h:
680
681 2011-04-09  Geoffrey Garen  <ggaren@apple.com>
682
683         Not reviewed.
684
685         Try recommitting some things svn left out of my last commit.
686
687         * ForwardingHeaders/collector: Removed.
688         * ForwardingHeaders/collector/handles: Removed.
689         * ForwardingHeaders/collector/handles/Global.h: Removed.
690
691 2011-04-08  Dimitri Glazkov  <dglazkov@chromium.org>
692
693         Reviewed by Ojan Vafai.
694
695         Implement proper handling of mouseover/mouseout events in regard to shadow DOM boundaries.
696         https://bugs.webkit.org/show_bug.cgi?id=55515
697
698         This implements XBL 2.0's specified handling of mouseover/mouseout events:
699         http://dev.w3.org/2006/xbl2/Overview.html#the-mouseover-and-mouseout-events
700
701         To do this, we:
702         1) calculate lowest common ancestor between relatedTarget and target, and
703            the nearest boundaries around them: the outer (common) boundary, and the
704            inner (specific to relatedTarget) boundary. Then, we
705         2) ensure that events only propagate up to the common boundary (or
706            all the way if boundary is not found), while
707         3) updating relatedTarget be the inner boundary.
708
709         We also detect the most common case when no common boundary could exist
710         and provide a fast path to short-circuit most of the boundary detection
711         logic.
712
713         Test: fast/events/shadow-boundary-crossing.html
714
715         * dom/EventDispatcher.cpp:
716         (WebCore::EventDispatcher::adjustToShadowBoundaries): Added a helper to determine lowest
717             common ancestor, the boundaries around it, and compute adjustments
718             to relatedTarget and event target ancestor chain.
719         (WebCore::ancestorsCrossShadowBoundaries): Added.
720         (WebCore::EventDispatcher::adjustRelatedTarget): Changed to calculate
721             inner/outer shadow DOM boundaries and adjust ancestors chain accordingly.
722         (WebCore::EventDispatcher::EventDispatcher): Added flag initializer
723         (WebCore::EventDispatcher::ensureEventAncestors): Renamed from getEventAncestors,
724             converted to use initialization flag, rather than testing for empty.
725         * dom/EventDispatcher.h: Adjusted decls.
726         * dom/MouseEvent.cpp:
727         (WebCore::MouseEventDispatchMediator::dispatchEvent): Changed to send event
728             to adjustRelatedTarget.
729
730 2011-04-08  Geoffrey Garen  <ggaren@apple.com>
731
732         Reviewed by Oliver Hunt.
733
734         A few heap-related renames and file moves.
735         
736         WeakGCPtr<T> => Weak<T>
737         Global<T> => Strong<T>
738         collector/ => heap/
739         collector/* => heap/*
740         runtime/WeakGCPtr.h => heap/Weak.h
741         
742         (Eventually, even more files should move into the heap directory. Like
743         Heap.h and Heap.cpp, for example.)
744
745         * CMakeLists.txt:
746         * ForwardingHeaders/collector: Removed.
747         * ForwardingHeaders/heap: Copied from ForwardingHeaders/collector.
748         * ForwardingHeaders/heap/Strong.h: Copied from ForwardingHeaders/collector/handles/Global.h.
749         * ForwardingHeaders/heap/Weak.h: Copied from ForwardingHeaders/runtime/WeakGCPtr.h.
750         * ForwardingHeaders/runtime/WeakGCPtr.h: Removed.
751         * WebCore.vcproj/WebCore.vcproj:
752         * WebCore.vcproj/copyForwardingHeaders.cmd:
753         * bindings/js/JSCallbackData.h:
754         * bindings/js/JSCustomVoidCallback.h:
755         * bindings/js/JSDOMWindowBase.h:
756         * bindings/js/JSDOMWindowShell.cpp:
757         (WebCore::JSDOMWindowShell::setWindow):
758         * bindings/js/JSDataGridDataSource.h:
759         * bindings/js/JSEventListener.h:
760         * bindings/js/ScheduledAction.cpp:
761         (WebCore::ScheduledAction::ScheduledAction):
762         * bindings/js/ScheduledAction.h:
763         * bindings/js/ScriptCachedFrameData.cpp:
764         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
765         * bindings/js/ScriptCachedFrameData.h:
766         * bindings/js/ScriptController.cpp:
767         (WebCore::ScriptController::createWindowShell):
768         * bindings/js/ScriptController.h:
769         * bindings/js/ScriptObject.h:
770         * bindings/js/ScriptState.h:
771         * bindings/js/ScriptValue.cpp:
772         * bindings/js/ScriptValue.h:
773         * bindings/js/ScriptWrappable.h:
774         * bindings/js/WorkerScriptController.cpp:
775         (WebCore::WorkerScriptController::initScript):
776         * bindings/js/WorkerScriptController.h:
777         * bridge/jsc/BridgeJSC.h:
778         * bridge/qt/qt_runtime.h:
779         * bridge/runtime_root.h:
780         * xml/XMLHttpRequest.cpp:
781
782 2011-04-09  Keith Kyzivat  <keith.kyzivat@nokia.com>
783
784         Reviewed by Laszlo Gombos.
785
786         [Qt] Don't link against fontconfig or X11 if embedded
787         https://bugs.webkit.org/show_bug.cgi?id=58104
788
789         No functional change so no new tests.
790
791         * WebCore.pri: qpa=>embedded should be done very early so all cases of embedded are uniform.
792
793 2011-04-09  Csaba Osztrogon√°c  <ossy@webkit.org>
794
795         [Qt] Unreviewed trivial fix after r83344.
796
797         * WebCore.pro: Update HEADERS list.
798
799 2011-04-09  Jon Lee  <jonlee@apple.com>
800
801         Reviewed by Beth Dakin.
802
803         Overlay scrollbar flashes in scrollable <textarea> with each keystroke (58180)
804         https://bugs.webkit.org/show_bug.cgi?id=58180
805         <rdar://problem/9047984>
806
807         * platform/mac/ScrollAnimatorMac.mm:
808         (WebCore::ScrollAnimatorMac::immediateScrollToPoint): Check that there is a change before submitting
809         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
810         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
811
812 2011-04-09  Sreeram Ramachandran  <sreeram@google.com>
813
814         Reviewed by Ryosuke Niwa.
815
816         Gather data on modal dialogs shown during unload events
817         https://bugs.webkit.org/show_bug.cgi?id=58115
818
819         Add a new method to the ChromeClient API to allow clients to receive
820         notifications of modal dialogs dispatched during page dismissal events.
821         The new method has a default empty definition; only chromium overrides
822         it to keep track of histograms.
823
824         No tests because this is a no-op for all ports except chromium (and it's
825         not clear how to test chromium histograms from webkit).
826
827         * page/Chrome.cpp:
828         (WebCore::isDuringPageDismissal):
829         (WebCore::willRunModalDialog):
830         (WebCore::Chrome::runJavaScriptAlert):
831         (WebCore::Chrome::runJavaScriptConfirm):
832         (WebCore::Chrome::runJavaScriptPrompt):
833         (WebCore::Chrome::willRunModalHTMLDialog):
834         * page/Chrome.h:
835         * page/ChromeClient.h:
836         (WebCore::ChromeClient::willRunModalDialogDuringPageDismissal):
837         * page/DOMWindow.cpp:
838         (WebCore::DOMWindow::showModalDialog):
839
840 2011-04-08  David Humphrey  <david.humphrey@senecac.on.ca>
841
842         Reviewed by Eric Carlson.
843
844         Fix call order of media element muted and play(), such that setting muted before play() works.
845         https://bugs.webkit.org/show_bug.cgi?id=57673
846         https://code.google.com/p/chromium/issues/detail?id=70777
847
848         Manual test added: manual-tests/media-muted.html
849
850         * html/HTMLMediaElement.cpp:
851         (WebCore::HTMLMediaElement::updatePlayState):
852         * manual-tests/media-muted.html: Added.
853
854 2011-04-08  Nat Duca  <nduca@chromium.org>
855
856         Reviewed by David Levin.
857
858         [chromium] Fix windows assertion on ~CCThread
859         https://bugs.webkit.org/show_bug.cgi?id=58153
860
861         Because ~CCThread uses waitForThreadCompletion,
862         calling detachThread is not necessary.
863
864         * platform/graphics/chromium/cc/CCThread.cpp:
865         (WebCore::CCThread::runLoop):
866
867 2011-04-08  Jian Li  <jianli@chromium.org>
868
869         Unreviewed, rolling out r83348.
870         http://trac.webkit.org/changeset/83348
871         https://bugs.webkit.org/show_bug.cgi?id=49508
872
873         Breaks layout tests in QT, Win7 and Chromium.
874
875         * rendering/RenderText.cpp:
876         (WebCore::RenderText::localCaretRect):
877
878 2011-04-08  MORITA Hajime  <morrita@google.com>
879
880         Reviewed by Simon Fraser.
881
882         Negative spread should not make a sharp corner rounded
883         https://bugs.webkit.org/show_bug.cgi?id=58162
884
885         Handled inset shadow path for rounded and non-rounded rect
886         differently as normal shadow path is doing.
887         
888         * rendering/RenderBoxModelObject.cpp:
889         (WebCore::RenderBoxModelObject::paintBoxShadow):
890
891 2011-04-07  Simon Fraser  <simon.fraser@apple.com>
892
893         Reviewed by Martin Robinson.
894
895         REGRESSION (r77034-r77220): CSS box-shadow no longer renders on PowerPC
896         https://bugs.webkit.org/show_bug.cgi?id=55180
897
898         The endianness #ifdef in ShadowBlur was unnecessary and harmful. The
899         data we get back from ImageBuffer::getImageData() do not vary in
900         endianness.
901
902         * platform/graphics/ShadowBlur.cpp:
903         (WebCore::ShadowBlur::blurLayerImage):
904
905 2011-04-08  Erik Arvidsson  <arv@chromium.org>
906
907         Reviewed by Dimitri Glazkov.
908
909         IFrame is getting the focus even though it is hidden
910         https://bugs.webkit.org/show_bug.cgi?id=55861
911
912         Test: fast/dom/hidden-iframe-no-focus.html
913
914         * html/HTMLFrameOwnerElement.cpp:
915         (WebCore::HTMLFrameOwnerElement::isKeyboardFocusable):
916         * html/HTMLFrameOwnerElement.h:
917
918 2011-04-08  Jeff Timanus  <twiz@chromium.org>
919
920         Reviewed by Kenneth Russell.
921
922         Fall back to software rendering for Canvas2D when requesting a DrawingBuffer larger than supported by the GL environment.
923         https://bugs.webkit.org/show_bug.cgi?id=57768
924
925         * html/canvas/CanvasRenderingContext2D.cpp:
926         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
927         (WebCore::CanvasRenderingContext2D::reset):
928         * platform/graphics/gpu/DrawingBuffer.cpp:
929         (WebCore::DrawingBuffer::reset):
930         * platform/graphics/gpu/DrawingBuffer.h:
931
932 2011-04-08  Daniel Cheng  <dcheng@chromium.org>
933
934         Reviewed by Dmitry Titov.
935
936         [chromium] Implement image/png support in DataTransferItems
937         https://bugs.webkit.org/show_bug.cgi?id=58106
938
939         This patch implements DataTransferItem::getAsFile() using Blobs. In
940         addition, plumbing for image/png has been added so image paste will be
941         supported as long as the renderer makes that data available.
942
943         Tests: editing/pasteboard/data-transfer-items-image-png.html
944
945         * dom/DataTransferItem.h:
946         * dom/DataTransferItem.idl:
947         * platform/chromium/ClipboardMimeTypes.cpp:
948         * platform/chromium/ClipboardMimeTypes.h:
949         * platform/chromium/DataTransferItemChromium.cpp:
950         (WebCore::DataTransferItemChromium::getAsString):
951         (WebCore::DataTransferItemChromium::getAsFile):
952         * platform/chromium/DataTransferItemChromium.h:
953         * platform/chromium/PlatformBridge.h:
954
955 2011-04-08 MORITA Hajime  <morrita@google.com>
956
957         Unreviewed windows build fix.
958         
959         * editing/SpellingCorrectionController.h:
960         (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
961
962 2011-04-08  Enrica Casucci  <enrica@apple.com>
963
964         Reviewed by Maciej Stachowiak.
965
966         Improve lifetime management of nodes in ReplaceNodeWithSpanCommand.
967         https://bugs.webkit.org/show_bug.cgi?id=57595
968         <rdar://problem/9222122>
969
970         Test: editing/style/bold-with-dom-changes.html
971
972         * editing/ReplaceNodeWithSpanCommand.cpp:
973         (WebCore::swapInNodePreservingAttributesAndChildren):
974
975 2011-04-07  Roland Steiner  <rolandsteiner@chromium.org>
976
977         Reviewed by Dimitri Glazkov.
978
979         Bug 58060 - Prepare access to TreeScope from Node, using NodeRareData
980         https://bugs.webkit.org/show_bug.cgi?id=58060
981
982         Add a TreeScope pointer to NodeRareData to allow direct access to the containing tree scope.
983         However, in case the containing scope is the document, this is not set, and the
984         document pointer within Node is used instead.
985
986         In an object derived from TreeScope (currently Document), the tree scope pointer
987         points to itself. Such objects also contain a parent tree scope pointer that
988         points to the containing scope. For Document, this is 0.
989
990         Add new functions setTreeScope[Recursively] that replace setDocument[Recursively]
991         in public usage. setDocument[Recursively] are now only used internally and are
992         thererfore protected.
993
994         No new tests. (no new functionality)
995
996         * dom/ContainerNode.cpp: change DOM manipulation methods to update scope of inserted nodes
997         (WebCore::ContainerNode::insertBefore):
998         (WebCore::ContainerNode::replaceChild):
999         (WebCore::ContainerNode::appendChild):
1000         * dom/Document.cpp:
1001         (WebCore::Document::~Document):
1002         (WebCore::Document::setDocType): Ditto
1003         (WebCore::Document::adoptNode): Ditto
1004         * dom/Document.h:
1005         * dom/Node.cpp:
1006         (WebCore::Node::treeScope): use NodeRareData to check if a non-Document scope is set
1007         (WebCore::Node::setTreeScope): update NodeRareData depending on whether scope is a document
1008         (WebCore::Node::setTreeScopeRecursively):
1009         (WebCore::Node::setDocumentRecursively):
1010         * dom/Node.h:
1011         * dom/NodeRareData.h: add scope pointer
1012         (WebCore::NodeRareData::NodeRareData):
1013         (WebCore::NodeRareData::treeScope):
1014         (WebCore::NodeRareData::setTreeScope):
1015         * dom/TreeScope.cpp: add parentTreeScope pointer
1016         (WebCore::TreeScope::TreeScope):
1017         (WebCore::TreeScope::setParentTreeScope):
1018         * dom/TreeScope.h:
1019         (WebCore::TreeScope::parentTreeScope):
1020
1021 2011-04-08  Xiaomei Ji  <xji@chromium.org>
1022
1023         Reviewed by David Hyatt.
1024
1025         Local caret rectangle calculation should be relative to its containing block.
1026         https://bugs.webkit.org/show_bug.cgi?id=49508.
1027
1028         InlineBox and caret rectangle are positioned relative to its containing block.
1029         So its left and right edge value should be relative to its containing block as well. 
1030
1031         Test: fast/forms/cursor-at-editable-content-boundary.html
1032
1033         * rendering/RenderText.cpp:
1034         (WebCore::RenderText::localCaretRect):
1035
1036 2011-04-08  MORITA Hajime  <morrita@google.com>
1037
1038         Unreviewed build fix.
1039
1040         * editing/Editor.cpp:
1041         (WebCore::Editor::markMisspellingsAfterTypingToWord):
1042
1043 2011-04-08  David Hyatt  <hyatt@apple.com>
1044
1045         Reviewed by Simon Fraser.
1046
1047         https://bugs.webkit.org/show_bug.cgi?id=57971
1048         
1049         Rework visited/unvisited links for before/after content. Propagate the bits earlier so that we don't lose
1050         them when we throw away the visited style. Don't throw away the visited link style for pseudo elements
1051         either, so that the styles are consistent.
1052
1053         Added fast/history/visited-generated-content-test.html
1054
1055         * css/CSSStyleSelector.cpp:
1056         (WebCore::CSSStyleSelector::styleForElement):
1057         (WebCore::CSSStyleSelector::pseudoStyleForElement):
1058
1059 2011-04-06  MORITA Hajime  <morrita@google.com>
1060
1061         Reviewed by Darin Adler.
1062
1063         [Refactoring] Auto correction panel should be handled by its own class.
1064         https://bugs.webkit.org/show_bug.cgi?id=55571
1065
1066         Extracted code inside SUPPORT_AUTOCORRECTION_PANEL into
1067         SpellingCorrectionController class.
1068         This change also remove some SUPPORT_AUTOCORRECTION_PANEL guard if
1069         code paths inside the never reached without autocorrection support.
1070         Removing guards reduces unintentional build breakage.
1071
1072         No new tests, no behavior chagne.
1073
1074         * CMakeLists.txt:
1075         * GNUmakefile.am:
1076         * WebCore.gypi:
1077         * WebCore.pro:
1078         * WebCore.vcproj/WebCore.vcproj:
1079         * WebCore.xcodeproj/project.pbxproj:
1080         * editing/CorrectionPanelInfo.h: Removed.
1081         * editing/EditingAllInOne.cpp:
1082         * editing/Editor.cpp:
1083         (WebCore::Editor::respondToChangedSelection):
1084         (WebCore::Editor::respondToChangedContents):
1085         (WebCore::Editor::appliedEditing):
1086         (WebCore::Editor::Editor):
1087         (WebCore::Editor::~Editor):
1088         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1089         (WebCore::Editor::insertLineBreak):
1090         (WebCore::Editor::insertParagraphSeparator):
1091         (WebCore::Editor::cut):
1092         (WebCore::Editor::paste):
1093         (WebCore::Editor::pasteAsPlainText):
1094         (WebCore::Editor::isAutomaticSpellingCorrectionEnabled):
1095         (WebCore::Editor::markMisspellingsAfterTypingToWord):
1096         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1097         (WebCore::Editor::changeBackToReplacedString):
1098         (WebCore::Editor::unappliedSpellCorrection):
1099         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
1100         (WebCore::Editor::startCorrectionPanelTimer):
1101         (WebCore::Editor::handleCorrectionPanelResult):
1102         (WebCore::Editor::dismissCorrectionPanelAsIgnored):
1103         * editing/Editor.h:
1104         * editing/SpellingCorrectionCommand.cpp:
1105         * editing/SpellingCorrectionController.cpp: Added.
1106         (WebCore::markerTypesForAutocorrection):
1107         (WebCore::markerTypesForReplacement):
1108         (WebCore::markersHaveIdenticalDescription):
1109         (WebCore::SpellingCorrectionController::SpellingCorrectionController):
1110         (WebCore::SpellingCorrectionController::~SpellingCorrectionController):
1111         (WebCore::SpellingCorrectionController::startCorrectionPanelTimer):
1112         (WebCore::SpellingCorrectionController::stopCorrectionPanelTimer):
1113         (WebCore::SpellingCorrectionController::stopPendingCorrection):
1114         (WebCore::SpellingCorrectionController::applyPendingCorrection):
1115         (WebCore::SpellingCorrectionController::hasPendingCorrection):
1116         (WebCore::SpellingCorrectionController::isSpellingMarkerAllowed):
1117         (WebCore::SpellingCorrectionController::show):
1118         (WebCore::SpellingCorrectionController::handleCancelOperation):
1119         (WebCore::SpellingCorrectionController::dismiss):
1120         (WebCore::SpellingCorrectionController::dismissSoon):
1121         (WebCore::SpellingCorrectionController::applyCorrectionPanelInfo):
1122         (WebCore::SpellingCorrectionController::applyAutocorrectionBeforeTypingIfAppropriate):
1123         (WebCore::SpellingCorrectionController::respondToUnappliedSpellCorrection):
1124         (WebCore::SpellingCorrectionController::correctionPanelTimerFired):
1125         (WebCore::SpellingCorrectionController::handleCorrectionPanelResult):
1126         (WebCore::SpellingCorrectionController::isAutomaticSpellingCorrectionEnabled):
1127         (WebCore::SpellingCorrectionController::windowRectForRange):
1128         (WebCore::SpellingCorrectionController::respondToChangedSelection):
1129         (WebCore::SpellingCorrectionController::respondToAppliedEditing):
1130         (WebCore::SpellingCorrectionController::client):
1131         (WebCore::SpellingCorrectionController::textChecker):
1132         (WebCore::SpellingCorrectionController::recordAutocorrectionResponseReversed):
1133         (WebCore::SpellingCorrectionController::markReversed):
1134         (WebCore::SpellingCorrectionController::markCorrection):
1135         (WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
1136         * editing/SpellingCorrectionController.h: Added.
1137         (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
1138         (WebCore::SpellingCorrectionController::shouldStartTimeFor):
1139         (WebCore::SpellingCorrectionController::shouldRemoveMarkersUponEditing):        
1140         * editing/TypingCommand.cpp:
1141         (WebCore::TypingCommand::insertText):
1142         (WebCore::TypingCommand::markMisspellingsAfterTyping):
1143         (WebCore::TypingCommand::deleteKeyPressed):
1144         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1145         * editing/htmlediting.h:
1146         (WebCore::isAmbiguousBoundaryCharacter):
1147         * page/EditorClient.h:
1148         * page/Frame.cpp:
1149         (WebCore::Frame::setPageAndTextZoomFactors):
1150
1151 2011-04-08  Alpha Lam  <hclam@chromium.org>
1152
1153         Unreviewed, rolling out r83335.
1154         http://trac.webkit.org/changeset/83335
1155         https://bugs.webkit.org/show_bug.cgi?id=53556
1156
1157         GTK and QT bots are broken
1158
1159         * CMakeLists.txt:
1160         * Configurations/FeatureDefines.xcconfig:
1161         * DerivedSources.make:
1162         * GNUmakefile.am:
1163         * WebCore.gypi:
1164         * WebCore.xcodeproj/project.pbxproj:
1165         * features.pri:
1166         * html/HTMLAttributeNames.in:
1167         * html/HTMLTagNames.in:
1168         * html/HTMLTrackElement.cpp: Removed.
1169         * html/HTMLTrackElement.h: Removed.
1170         * html/HTMLTrackElement.idl: Removed.
1171
1172 2011-04-08  Brady Eidson  <beidson@apple.com>
1173
1174         Reviewed by Adam Roben.
1175
1176         https://bugs.webkit.org/show_bug.cgi?id=58155 and part of <rdar://problem/9251767>
1177         BitmapImage::getFirstCGImageRefOfSize fails if the frameCount hasn't been initialized from the image source.
1178
1179         * platform/graphics/cg/ImageCG.cpp:
1180         (WebCore::BitmapImage::getFirstCGImageRefOfSize): Call frameCount() instead of accessing m_frames.size() to
1181           make sure the frames are properly tallied first.
1182
1183 2011-04-08  Benjamin Poulain  <benjamin.poulain@nokia.com>
1184
1185         Reviewed by Andreas Kling.
1186
1187         [Qt] Dragging and dropping an image in edit mode does not work
1188         https://bugs.webkit.org/show_bug.cgi?id=19385
1189
1190         When adding an image to the clipboard, we should also include the HTML code of that image so
1191         it can be used for internal drag and drop.
1192
1193         This HTML is expected by all clients of drop events so a fragment can be moved from one browser to
1194         another, or inside the same browser.
1195
1196         * platform/qt/ClipboardQt.cpp:
1197         (WebCore::ClipboardQt::declareAndWriteDragImage):
1198
1199 2011-04-07  Anna Cavender  <annacc@chromium.org>
1200
1201         Reviewed by Eric Carlson.
1202
1203         Setup ENABLE(TRACK) feature define + initial HTMLTrackElement
1204         https://bugs.webkit.org/show_bug.cgi?id=53556
1205
1206         No new tests. No real functionality added just yet.
1207
1208         * CMakeLists.txt:
1209         * Configurations/FeatureDefines.xcconfig:
1210         * DerivedSources.make:
1211         * GNUmakefile.am:
1212         * WebCore.gypi:
1213         * WebCore.xcodeproj/project.pbxproj:
1214         * features.pri:
1215         * html/HTMLAttributeNames.in:
1216         * html/HTMLTagNames.in:
1217         * html/HTMLTrackElement.cpp: Added.
1218         (WebCore::HTMLTrackElement::HTMLTrackElement):
1219         (WebCore::HTMLTrackElement::create):
1220         (WebCore::HTMLTrackElement::insertedIntoTree):
1221         (WebCore::HTMLTrackElement::willRemove):
1222         (WebCore::HTMLTrackElement::src):
1223         (WebCore::HTMLTrackElement::setSrc):
1224         (WebCore::HTMLTrackElement::kind):
1225         (WebCore::HTMLTrackElement::setKind):
1226         (WebCore::HTMLTrackElement::srclang):
1227         (WebCore::HTMLTrackElement::setSrclang):
1228         (WebCore::HTMLTrackElement::label):
1229         (WebCore::HTMLTrackElement::setLabel):
1230         (WebCore::HTMLTrackElement::isDefault):
1231         (WebCore::HTMLTrackElement::setIsDefault):
1232         (WebCore::HTMLTrackElement::isURLAttribute):
1233         * html/HTMLTrackElement.h: Added.
1234         * html/HTMLTrackElement.idl: Added.
1235
1236 2011-04-07  Jer Noble  <jer.noble@apple.com>
1237
1238         Reviewed by Eric Carlson.
1239
1240         Logic error in HTMLMediaElement::exitFullscreen()
1241         https://bugs.webkit.org/show_bug.cgi?id=58085
1242
1243         The new full screen API case could fall through to the legacy API case
1244         unintentionally if a script calls exitFullscreen on an element which is
1245         not the current full screen element.
1246
1247         * html/HTMLMediaElement.cpp:
1248         (WebCore::HTMLMediaElement::enterFullscreen):
1249         (WebCore::HTMLMediaElement::exitFullscreen):
1250
1251 2011-04-08  Mike Reed  <reed@google.com>
1252
1253         Reviewed by Eric Seidel.
1254
1255         Replace SKIA_TEXT with isNativeFontRenderingAllowed() for print-preview to work
1256         https://bugs.webkit.org/show_bug.cgi?id=57782
1257
1258         No new tests. This change only affects print-preview and build option SKIA_GPU 
1259
1260         * platform/graphics/skia/SkiaFontWin.cpp:
1261         (WebCore::paintSkiaText):
1262
1263 2011-04-08  Ryosuke Niwa  <rniwa@webkit.org>
1264
1265         Reviewed by Tony Chang, Darin Adler, and Enrica Casucci.
1266
1267         REGRESSION(r81887): Crash in SplitElement
1268         https://bugs.webkit.org/show_bug.cgi?id=57743
1269
1270         The crash was caused by ReplaceSelectionCommand::doApply's calling splitElement with computeNodeAfterPosition
1271         even when the position was after the last node in it container. Since all we are doing here is to splitting tree
1272         up until the highest ancestor with isInlineNodeWithStyle, replaced the while loop by calls to splitTreeToNode
1273         and highestEnclosingNodeOfType.
1274
1275         Also fixed a bug in splitTreeToNode not to check the difference in visible position when splitting the ancestor,
1276         which would have introduced unnecessary nodes when splitting tree and a bug in highestEnclosingNodeOfType that
1277         it incorrectly called deprecatedNode instead of containerNode.
1278
1279         Test: editing/inserting/insert-images-in-pre-x-crash.html
1280
1281         * editing/CompositeEditCommand.cpp:
1282         (WebCore::CompositeEditCommand::splitTreeToNode):
1283         * editing/ReplaceSelectionCommand.cpp:
1284         (WebCore::ReplaceSelectionCommand::doApply):
1285         * editing/htmlediting.cpp:
1286         (WebCore::highestEnclosingNodeOfType):
1287
1288 2011-04-08  Antti Koivisto  <antti@apple.com>
1289
1290         Reviewed by Tony Gentilcore.
1291
1292         Incoming source should be preload scanned when the parser is blocked 
1293         https://bugs.webkit.org/show_bug.cgi?id=58117
1294
1295         Scan the appended source if parser is blocked.
1296
1297         Test: http/tests/loading/preload-append-scan.php
1298
1299         * html/parser/HTMLDocumentParser.cpp:
1300         (WebCore::HTMLDocumentParser::append):
1301
1302 2011-04-08  Martin Robinson  <mrobinson@igalia.com>
1303
1304         Reviewed by Xan Lopez.
1305
1306         [GTK] Fix the WebKit2 build for older versions of GTK+
1307         https://bugs.webkit.org/show_bug.cgi?id=58095
1308
1309         No new tests. This is just a build fix.
1310
1311         * platform/gtk/GtkVersioning.c:
1312         (gdk_window_create_similar_surface): Reimplement this method for older versions of GDK.
1313         * platform/gtk/GtkVersioning.h: Add the new method to the header.
1314
1315 2011-04-08  Misha Tyutyunik  <michael.tyutyunik@nokia.com>
1316
1317         Reviewed by Laszlo Gombos.
1318
1319         [Qt] Plugin is not scrolled together with page content or jumping 
1320         when content is rendered using cache (backing store).
1321         https://bugs.webkit.org/show_bug.cgi?id=56130
1322         
1323         This is a Symbian portion of the fix. For Linux it looks like
1324         it's enough to call set geometry which should be addressed in
1325         https://bugs.webkit.org/show_bug.cgi?id=57179
1326
1327         No new tests required. This can be tested with manual tests from 
1328         WebCore/manual-tests/qt and WebCore/manual-tests/plugins
1329
1330         * plugins/symbian/PluginViewSymbian.cpp:
1331         (WebCore::PluginView::updatePluginWidget):
1332
1333 2011-04-08  Abhishek Arya  <inferno@chromium.org>
1334
1335         Unreviewed. Remove accidental printf added in r83306.
1336
1337         * page/EventHandler.cpp:
1338         (WebCore::EventHandler::sendContextMenuEvent):
1339
1340 2011-04-08  Enrica Casucci  <enrica@apple.com>
1341
1342         Reviewed by Darin Adler.
1343
1344         Dragging text in a WebKit2 window results in a copy instead of a move.
1345         https://bugs.webkit.org/show_bug.cgi?id=56772
1346         <rdar://problem/9165140>
1347
1348         cleanupAfterSystemDrag cannot call dragEnd in WebKit2, since
1349         the call to startDrag is asynchronous.
1350         
1351         * page/mac/DragControllerMac.mm:
1352         (WebCore::DragController::cleanupAfterSystemDrag):
1353
1354 2011-04-05  Dimitri Glazkov  <dglazkov@chromium.org>
1355
1356         Reviewed by Darin Adler.
1357
1358         Move WheelEvent-dispatching logic into WheelEventDispatchMediator.
1359         https://bugs.webkit.org/show_bug.cgi?id=57642
1360
1361         Covered by existing tests, no functional change.
1362
1363         * dom/Event.cpp:
1364         * dom/Event.h:
1365         (WebCore::EventDispatchMediator::EventDispatchMediator): Added default
1366             constructor.
1367         (WebCore::EventDispatchMediator::event): Inlined.
1368         (WebCore::EventDispatchMediator::setEvent): Added.
1369         * dom/EventDispatcher.cpp: Removed dispatchWheelEvent.
1370         * dom/EventDispatcher.h: Updated decls.
1371         * dom/Node.cpp:
1372         (WebCore::Node::dispatchWheelEvent): Changed to use the mediator and
1373             return a bool, like other dispatch event functions.
1374         * dom/Node.h: Changed decl.
1375         * dom/WheelEvent.cpp:
1376         (WebCore::granularity): Moved from EventDispatcher.
1377         (WebCore::WheelEventDispatchMediator::WheelEventDisatchMediator): Added.
1378         (WebCore::WheelEventDispatchMediator::event): Added.
1379         (WebCore::WheelEventDispatchMediator::dispatchEvent): Added.
1380         * dom/WheelEvent.h: Updated decls.
1381         * page/EventHandler.cpp:
1382         (WebCore::EventHandler::handleWheelEvent): Changed to receive and react
1383             to the return value.
1384
1385 2011-04-08  Jessie Berlin  <jberlin@apple.com>
1386
1387         Windows build warning fix.
1388
1389         * WebCore.vcproj/WebCore.vcproj:
1390         Since ShadowRoot.cpp is included in the DOMAllInOne.cpp file, it should be excluded from
1391         the build.
1392
1393 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
1394
1395         Reviewed by Pavel Feldman.
1396
1397         Web Inspector: update breakpoints according to source frame decorations after live edit.
1398         https://bugs.webkit.org/show_bug.cgi?id=58029
1399
1400         * inspector/front-end/DebuggerPresentationModel.js:
1401         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource):
1402         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
1403         (WebInspector.DebuggerPresentationModel.prototype._updateResourceContent.didEditScriptSource):
1404         (WebInspector.DebuggerPresentationModel.prototype._updateResourceContent):
1405         * inspector/front-end/SourceFile.js:
1406         (WebInspector.SourceFile.prototype.set content):
1407         * inspector/front-end/SourceFrame.js:
1408         (WebInspector.SourceFrame.prototype._handleSave.didEditScriptSource):
1409         (WebInspector.SourceFrame.prototype._handleSave):
1410
1411 2011-04-08  Pavel Podivilov  <podivilov@chromium.org>
1412
1413         Reviewed by Pavel Feldman.
1414
1415         Web Inspector: fix scripts concatenation in scripts panel.
1416         https://bugs.webkit.org/show_bug.cgi?id=58138
1417
1418         When there is just one script starting at 0:0 it should not be surrounded by <script> framing.
1419
1420         * inspector/front-end/SourceFile.js:
1421         (WebInspector.SourceFile.prototype._loadResourceContent):
1422         (WebInspector.SourceFile.prototype._loadAndConcatenateScriptsContent):
1423
1424 2011-04-08  Pavel Feldman  <pfeldman@chromium.org>
1425
1426         Reviewed by Yury Semikhatsky.
1427
1428         Web Inspector: use "locations" for debugger scripts, "lineNumbers" for the UI elements.
1429         https://bugs.webkit.org/show_bug.cgi?id=58118
1430
1431         This change reuses location for call frames in the protocol + structures script
1432         location <-> source lines interaction better. When we need UI columns, we will add
1433         them, but we should distinguish between script and UI terms on the type level, not naming.
1434
1435         * English.lproj/localizedStrings.js:
1436         * bindings/v8/DebuggerScript.js:
1437         * inspector/InjectedScriptSource.js:
1438         * inspector/Inspector.json:
1439         * inspector/front-end/CallStackSidebarPane.js:
1440         (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLine):
1441         (WebInspector.CallStackSidebarPane.prototype.update):
1442         * inspector/front-end/DebuggerPresentationModel.js:
1443         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage.didRequestSourceMapping):
1444         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage):
1445         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
1446         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
1447         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
1448         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
1449         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
1450         (WebInspector.PresenationCallFrame):
1451         (WebInspector.PresenationCallFrame.prototype.sourceLine.didRequestSourceMapping):
1452         (WebInspector.PresenationCallFrame.prototype.sourceLine):
1453         * inspector/front-end/ScriptFormatter.js:
1454         (WebInspector.ScriptFormatter.locationToPosition):
1455         (WebInspector.ScriptFormatter.lineToPosition):
1456         * inspector/front-end/ScriptsPanel.js:
1457         (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation):
1458         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
1459         (WebInspector.ScriptsPanel.prototype.showAnchorLocation):
1460         (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation):
1461         (WebInspector.ScriptsPanel.prototype._callFrameSelected):
1462         * inspector/front-end/SourceFile.js:
1463         (WebInspector.SourceMapping.prototype.scriptLocationToSourceLine):
1464         (WebInspector.SourceMapping.prototype.sourceLineToScriptLocation):
1465         (WebInspector.FormattedSourceMapping.prototype.scriptLocationToSourceLine):
1466         (WebInspector.FormattedSourceMapping.prototype.sourceLineToScriptLocation):
1467
1468 2011-04-08  Pavel Podivilov  <podivilov@chromium.org>
1469
1470         Reviewed by Pavel Feldman.
1471
1472         Web Inspector: distinguish breakpoints set on de-obfuscated sources from breakponts set on original sources.
1473         https://bugs.webkit.org/show_bug.cgi?id=58133
1474
1475         * inspector/front-end/DebuggerPresentationModel.js:
1476         (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
1477         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1478         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
1479         (WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript):
1480         (WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId):
1481         (WebInspector.DebuggerPresentationModel.prototype._createSourceFileId):
1482         (WebInspector.DebuggerPresentationModel.prototype._reset):
1483
1484 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
1485
1486         Reviewed by Pavel Feldman.
1487
1488         Web Inspector: make SourceFrame TextViewer's delegate for editing operations.
1489         https://bugs.webkit.org/show_bug.cgi?id=58026
1490
1491         This is the first step of decoupling TextViewer from SourceFrame.
1492
1493         * inspector/front-end/SourceFrame.js:
1494         (WebInspector.SourceFrame):
1495         (WebInspector.SourceFrame.prototype.show):
1496         (WebInspector.SourceFrame.prototype.hide):
1497         (WebInspector.SourceFrame.prototype._ensureContentLoaded):
1498         (WebInspector.SourceFrame.prototype.contentEditable):
1499         (WebInspector.SourceFrame.prototype.startEditing):
1500         (WebInspector.SourceFrame.prototype.endEditing):
1501         (WebInspector.SourceFrame.prototype._createTextViewer):
1502         (WebInspector.SourceFrame.prototype._handleSave):
1503         (WebInspector.SourceFrame.prototype._handleRevertEditing):
1504         * inspector/front-end/TextViewer.js:
1505         (WebInspector.TextViewer.prototype._enterInternalTextChangeMode):
1506         (WebInspector.TextViewer.prototype._exitInternalTextChangeMode):
1507         (WebInspector.TextViewer.prototype._syncDecorationsForLine):
1508         (WebInspector.TextViewer.prototype._doubleClick):
1509         (WebInspector.TextViewerDelegate):
1510         (WebInspector.TextViewerDelegate.prototype.contentEditable):
1511         (WebInspector.TextViewerDelegate.prototype.startEditing):
1512         (WebInspector.TextViewerDelegate.prototype.endEditing):
1513         (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
1514         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
1515         * inspector/front-end/inspector.html:
1516
1517 2011-04-08  Leandro Gracia Gil  <leandrogracia@chromium.org>
1518
1519         Reviewed by Steve Block.
1520
1521         Media Stream API: add the getUserMedia method and the Javascript bindings.
1522         https://bugs.webkit.org/show_bug.cgi?id=56586
1523
1524         Add the getUserMedia method to the navigator and its new Javascript types.
1525         Current specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#video-conferencing-and-peer-to-peer-communication
1526
1527         Tests: fast/dom/MediaStream/argument-types.html
1528                fast/dom/MediaStream/enabled.html
1529                fast/dom/MediaStream/no-interface-object.html
1530
1531         * Android.derived.jscbindings.mk:
1532         * Android.derived.v8bindings.mk:
1533         * Android.v8bindings.mk:
1534         * CMakeLists.txt:
1535         * CodeGenerators.pri:
1536         * DerivedSources.cpp:
1537         * DerivedSources.make:
1538         * GNUmakefile.list.am:
1539         * WebCore.gypi:
1540         * WebCore.pro:
1541         * WebCore.vcproj/WebCore.vcproj:
1542         * WebCore.xcodeproj/project.pbxproj:
1543         * bindings/js/JSNavigatorCustom.cpp:
1544         (WebCore::JSNavigator::webkitGetUserMedia):
1545         * bindings/v8/custom/V8NavigatorCustom.cpp: Added.
1546         (WebCore::V8Navigator::webkitGetUserMediaCallback):
1547         * page/Navigator.cpp:
1548         (WebCore::Navigator::webkitGetUserMedia):
1549         * page/Navigator.h:
1550         * page/Navigator.idl:
1551         * page/NavigatorUserMediaError.h: Added.
1552         (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
1553         (WebCore::NavigatorUserMediaError::~NavigatorUserMediaError):
1554         (WebCore::NavigatorUserMediaError::code):
1555         * page/NavigatorUserMediaError.idl: Added.
1556         * page/NavigatorUserMediaErrorCallback.h: Added.
1557         (WebCore::NavigatorUserMediaErrorCallback::~NavigatorUserMediaErrorCallback):
1558         * page/NavigatorUserMediaErrorCallback.idl: Added.
1559         * page/NavigatorUserMediaSuccessCallback.h: Added.
1560         (WebCore::NavigatorUserMediaSuccessCallback::~NavigatorUserMediaSuccessCallback):
1561         * page/NavigatorUserMediaSuccessCallback.idl: Added.
1562
1563 2011-04-08  Mikhail Naganov  <mnaganov@chromium.org>
1564
1565         Reviewed by Pavel Feldman.
1566
1567         Web Inspector: [Chromium] Add more tests for detailed heap snapshots UI.
1568         https://bugs.webkit.org/show_bug.cgi?id=58010
1569         https://bugs.webkit.org/show_bug.cgi?id=58011
1570
1571         Added tests for "Containment" view. Minor refactorings, bugs fixed.
1572         Split one large tests into smaller ones to avoid timing out in debug mode.
1573
1574         Tests: inspector/profiler/detailed-heapshots-containment-expansion-preserved-when-sorting.html
1575                inspector/profiler/detailed-heapshots-containment-show-all.html
1576                inspector/profiler/detailed-heapshots-containment-show-next.html
1577                inspector/profiler/detailed-heapshots-containment-sorting.html
1578                inspector/profiler/detailed-heapshots-summary-expansion-preserved-when-sorting.html
1579                inspector/profiler/detailed-heapshots-summary-show-all.html
1580                inspector/profiler/detailed-heapshots-summary-show-next.html
1581                inspector/profiler/detailed-heapshots-summary-sorting.html
1582
1583         * inspector/front-end/DetailedHeapshotGridNodes.js:
1584         (WebInspector.HeapSnapshotGridNode):
1585         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
1586         (WebInspector.HeapSnapshotGridNode.prototype.sort.doSort):
1587         (WebInspector.HeapSnapshotGridNode.prototype.sort):
1588         (WebInspector.HeapSnapshotGenericObjectNode):
1589         (WebInspector.HeapSnapshotObjectNode):
1590         (WebInspector.HeapSnapshotInstanceNode):
1591         (WebInspector.HeapSnapshotConstructorNode):
1592         (WebInspector.HeapSnapshotDiffNode):
1593         (WebInspector.HeapSnapshotDominatorObjectNode):
1594         * inspector/front-end/DetailedHeapshotView.js:
1595         (WebInspector.HeapSnapshotContainmentDataGrid):
1596         (WebInspector.HeapSnapshotDominatorsDataGrid):
1597
1598 2011-04-08  Andrey Adaikin  <aandrey@google.com>
1599
1600         Reviewed by Pavel Feldman.
1601
1602         Web Inspector: Bugs in some corner cases in the text editor
1603         https://bugs.webkit.org/show_bug.cgi?id=58025
1604
1605         This solves the following bugs:
1606         1) The very last _empty_ line would not be deleted if you hit a Backspace on it, or the selection text to be deleted is extended to the very bottom of the editor.
1607         2) An odd corner case: delete all source code from the editor, hit backspace on the only empty line, then add a character. In this case the browser will insert a TEXT node instead of a DIV node for a lineRow.
1608
1609         * inspector/front-end/TextViewer.js:
1610         (WebInspector.TextEditorMainPanel.prototype._selectionToPosition):
1611         (WebInspector.TextEditorMainPanel.prototype._enclosingLineRowOrSelf):
1612         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
1613         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
1614         (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDiv):
1615
1616 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
1617
1618         Reviewed by Pavel Feldman.
1619
1620         Web Inspector: add test for script formatter worker.
1621         https://bugs.webkit.org/show_bug.cgi?id=57447
1622
1623         Test: inspector/debugger/script-formatter.html
1624
1625         * GNUmakefile.am:
1626         * WebCore.xcodeproj/project.pbxproj:
1627         * gyp/streamline-inspector-source.sh:
1628         * inspector/front-end/DebuggerPresentationModel.js:
1629         (WebInspector.DebuggerPresentationModel.prototype._addScript):
1630         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1631         (WebInspector.DebuggerPresentationModel.prototype._formatter):
1632         * inspector/front-end/ScriptFormatterWorker.js:
1633
1634 2011-04-08  Andrey Adaikin  <aandrey@google.com>
1635
1636         Reviewed by Pavel Feldman.
1637
1638         Web Inspector: Tweak dynamically constants for the async highlighting in text editor
1639         https://bugs.webkit.org/show_bug.cgi?id=58035
1640
1641         * inspector/front-end/TextViewer.js:
1642         (WebInspector.TextEditorMainPanel.prototype._expandChunks):
1643         (WebInspector.TextEditorMainPanel.prototype._schedulePaintLines):
1644         (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
1645         (WebInspector.TextEditorMainPanel.prototype._restorePaintLinesOperationsCredit):
1646         (WebInspector.TextEditorMainPanel.prototype._adjustPaintLinesOperationsRefreshValue):
1647
1648 2011-04-08  Andrey Kosyakov  <caseq@chromium.org>
1649
1650         Reviewed by Yury Semikhatsky.
1651
1652         Web Inspector: HAR compliance fixes
1653         https://bugs.webkit.org/show_bug.cgi?id=58124
1654
1655         - Always provide some values for queryString and cookies, even though arrays may be empty
1656         - Always provide an empty cache object
1657         - Added entire HARLog to test
1658         - Workaround in test to avoid custom expectations (favicon.ico appears in log on certain platforms)
1659
1660         * inspector/front-end/HAREntry.js:
1661         (WebInspector.HAREntry.prototype.build):
1662         (WebInspector.HAREntry.prototype._buildRequest):
1663         (WebInspector.HAREntry.prototype._buildResponse):
1664
1665 2011-04-08  Adam Barth  <abarth@webkit.org>
1666
1667         Attempt to fix the Qt build.
1668
1669         * css/CSSStyleApplyProperty.cpp:
1670
1671 2011-04-07  Adam Barth  <abarth@webkit.org>
1672
1673         Reviewed by Eric Seidel.
1674
1675         Refactor WebCore/GNUMakefile.am to separate list of files
1676         https://bugs.webkit.org/show_bug.cgi?id=58116
1677
1678         This change is similar to the cooresponding to change to
1679         JavaScriptCore.  We hope to generate GNUmakefile.list.am automatically
1680         using GYP.
1681
1682         * GNUmakefile.am:
1683         * GNUmakefile.list.am: Added.
1684
1685 2011-04-07  Geoffrey Garen  <ggaren@apple.com>
1686
1687         Not reviewed.
1688
1689         Rolled out some accidentally-committed changes in my last commit.
1690
1691         * dom/EventTarget.cpp:
1692         (WebCore::EventTarget::addEventListener):
1693         (WebCore::EventTarget::removeEventListener):
1694         * dom/EventTarget.h:
1695
1696 2011-04-07  Julien Chaffraix  <jchaffraix@codeaurora.org>
1697
1698         Reviewed by Alexey Proskuryakov.
1699
1700         EventSource should only accept UTF-8 charset
1701         https://bugs.webkit.org/show_bug.cgi?id=56942
1702
1703         Following the discussion on bug 45372, this change implements the recommended
1704         way of handling "charset". We only accept UTF-8 but no other encoding. This matches
1705         the encoding of the EventSource and also may fix TomCat that automatically send this
1706         charset.
1707
1708         * page/EventSource.cpp:
1709         (WebCore::EventSource::didReceiveResponse): We now check the charset attribute and if it is
1710         not UTF-8, abort the connection and log the error to the console. Also we log if the MIME type
1711         is wrong to the console to help debugging (only in the case of an HTTP 200 response though).
1712
1713 2011-04-07  Geoffrey Garen  <ggaren@apple.com>
1714
1715         Reviewed by Maciej Stachowiak.
1716
1717         Some Handle<T> cleanup
1718         https://bugs.webkit.org/show_bug.cgi?id=58109
1719
1720         * bindings/js/ScriptValue.h:
1721         (WebCore::ScriptValue::ScriptValue): Updated for new null constructor.
1722         (WebCore::ScriptValue::hasNoValue): Updated for removal of isEmpty().
1723
1724 2011-04-07  Dominic Cooney  <dominicc@google.com>
1725
1726         Reviewed by Dimitri Glazkov.
1727
1728         Let shadow DOM have a list of nodes at the top level of a shadow.
1729         https://bugs.webkit.org/show_bug.cgi?id=57813
1730
1731         Adds ShadowRoot, a list of nodes, to be a parent for top-level
1732         shadow children. Forwards rendering through the root and into the
1733         host's renderer.
1734
1735         Covered by existing tests of elements that use this style of shadow.
1736
1737         * Android.mk: add ShadowRoot.h/cpp
1738         * CMakeLists.txt:
1739         * GNUmakefile.am:
1740         * WebCore.exp.in:
1741         * WebCore.gypi:
1742         * WebCore.pro:
1743         * WebCore.vcproj/WebCore.vcproj:
1744         * WebCore.xcodeproj/project.pbxproj:
1745         * css/CSSStyleSelector.cpp:
1746         (WebCore::CSSStyleSelector::initForStyleResolve): proxy style to host
1747         * dom/ContainerNode.cpp: parent nodes that are shadow roots are alive
1748         (WebCore::ContainerNode::insertBefore):
1749         (WebCore::ContainerNode::replaceChild):
1750         (WebCore::ContainerNode::removeChild):
1751         (WebCore::ContainerNode::appendChild):
1752         * dom/DocumentFragment.cpp:
1753         (WebCore::DocumentFragment::DocumentFragment):
1754         * dom/DocumentFragment.h:
1755         * dom/Element.cpp:
1756         (WebCore::Element::recalcStyle): look through ShadowRoots for host's style
1757         (WebCore::Element::shadowRoot): should be const
1758         (WebCore::Element::ensureShadowRoot): simpler than setShadowRoot
1759         * dom/Element.h:
1760         * dom/ElementRareData.h:
1761         * dom/Node.cpp:
1762         (WebCore::Node::parentNodeForRenderingAndStyle): indirection so
1763           ShadowRoot can forward to the host's renderer
1764         (WebCore::Node::createRendererAndStyle):
1765         (WebCore::Node::createRendererIfNeeded):
1766         * dom/Node.h:
1767         (WebCore::Node::isShadowBoundary): temporary, to differentiate
1768           old- and new-style, until all roots are ShadowRoot instances
1769         * dom/ShadowRoot.cpp: Added.
1770         (WebCore::ShadowRoot::ShadowRoot):
1771         (WebCore::ShadowRoot::recalcStyle): forward recalc to children
1772         * dom/ShadowRoot.h: Added.
1773         (WebCore::ShadowRoot::isShadowBoundary):
1774         (WebCore::ShadowRoot::create):
1775         * html/HTMLKeygenElement.cpp: use ensureShadowRoot
1776         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
1777         (WebCore::HTMLKeygenElement::parseMappedAttribute):
1778         (WebCore::HTMLKeygenElement::appendFormData):
1779         (WebCore::HTMLKeygenElement::reset):
1780         (WebCore::HTMLKeygenElement::shadowSelect):
1781         * html/HTMLKeygenElement.h:
1782         * html/HTMLMeterElement.cpp: use ensureShadowRoot
1783         (WebCore::HTMLMeterElement::createShadowSubtree):
1784         * html/HTMLProgressElement.cpp: use ensureShadowRoot
1785         (WebCore::HTMLProgressElement::createShadowSubtree):
1786         * html/InputType.cpp: use ensureShadowRoot
1787         (WebCore::InputType::destroyShadowSubtree):
1788         * html/RangeInputType.cpp: use ensureShadowRoot
1789         (WebCore::RangeInputType::handleMouseDownEvent):
1790         (WebCore::RangeInputType::createShadowSubtree):
1791         (WebCore::RangeInputType::valueChanged):
1792         (WebCore::RangeInputType::shadowSliderThumb):
1793         * html/RangeInputType.h:
1794         * html/ValidationMessage.cpp: use ensureShadowRoot
1795         (WebCore::ValidationMessage::buildBubbleTree):
1796         (WebCore::ValidationMessage::deleteBubbleTree):
1797         * html/shadow/SliderThumbElement.cpp:
1798         (WebCore::SliderThumbElement::setPositionFromPoint):
1799         (WebCore::SliderThumbElement::hostInput):
1800         * html/shadow/SliderThumbElement.h:
1801         * rendering/MediaControlElements.cpp: use ensureShadowRoot
1802         (WebCore::MediaControlInputElement::attach):
1803         (WebCore::MediaControlInputElement::updateStyle):
1804         * rendering/RenderSlider.cpp: use ensureShadowRoot
1805         (WebCore::RenderSlider::thumbRect):
1806         (WebCore::RenderSlider::layout):
1807         (WebCore::RenderSlider::shadowSliderThumb):
1808         (WebCore::RenderSlider::inDragMode):
1809         * rendering/RenderSlider.h:
1810
1811 2011-04-07  Maciej Stachowiak  <mjs@apple.com>
1812
1813         Reviewed by Simon Fraser.
1814
1815         REGRESSION (r80871): Crash when visiting http://broadband.biglobe.ne.jp/
1816         https://bugs.webkit.org/show_bug.cgi?id=56297
1817         <rdar://problem/9131597>
1818
1819         Test: fast/css-generated-content/table-row-after-no-crash.html
1820
1821         * rendering/RenderTableRow.cpp:
1822         (WebCore::RenderTableRow::styleDidChange): Factor out generation of before/after
1823         content, and only do it if the row already has a parent. For construction of
1824         anonymous cells to work correctly, the row needs to already have a parent, so
1825         in that case wait a bit.
1826         (WebCore::RenderTableRow::updateBeforeAndAfterContent): Factored out to here.
1827         * rendering/RenderTableRow.h:
1828         * rendering/RenderTableSection.cpp:
1829         (WebCore::RenderTableSection::addChild): When adding a row, update its
1830         before/after content, in case it had any.
1831
1832 2011-04-07  Beth Dakin  <bdakin@apple.com>
1833
1834         Reviewed by Simon Fraser.
1835
1836         Probable fix for <rdar://problem/9251443>  Crashing on exception: -
1837         [ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]: unrecognized 
1838         selector sent to instance ADDRESS.
1839
1840        Need to implement new delegate method.
1841         * platform/mac/ScrollAnimatorMac.mm:
1842         (-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]):
1843
1844 2011-04-07  Ian Henderson  <ianh@apple.com>
1845
1846         Reviewed by Simon Fraser.
1847
1848         Optimize filling rounded rects that are actually ellipses
1849         https://bugs.webkit.org/show_bug.cgi?id=58098
1850
1851         In CG, drawing an ellipse directly is faster than constructing and
1852         filling a rounded rect path.  Detect when the given rounded rect is
1853         actually an ellipse and draw it directly in this case.
1854
1855         * platform/graphics/cg/GraphicsContextCG.cpp:
1856         (WebCore::GraphicsContext::fillRoundedRect):
1857
1858 2011-04-07  Ned Holbrook  <nholbrook@apple.com>
1859
1860         Reviewed by Dan Bernstein.
1861
1862         CTLine objects should outlive their CTRuns
1863         https://bugs.webkit.org/show_bug.cgi?id=58063
1864
1865         * platform/graphics/mac/ComplexTextController.h: Add m_coreTextLines, to be destroyed after m_complexTextRuns.
1866         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
1867         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Moot m_coreTextRun.
1868         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Append line to m_coreTextLines.
1869
1870 2011-04-07  Nat Duca  <nduca@chromium.org>
1871
1872         Reviewed by David Levin.
1873
1874         [chromium] Compositor thread infrastructure
1875         https://bugs.webkit.org/show_bug.cgi?id=56131
1876
1877         Introduce chrome compositor thread and related
1878         infrastructure.
1879
1880         * WebCore.gypi:
1881         * platform/graphics/chromium/cc/CCMainThread.cpp: Added.
1882         (WebCore::CCMainThread::performTask):
1883         (WebCore::CCMainThread::postTask):
1884         * platform/graphics/chromium/cc/CCMainThread.h: Added.
1885         (WebCore::CCMainThread::Task::~Task):
1886         (WebCore::CCMainThread::Task::instance):
1887         (WebCore::CCMainThread::Task::Task):
1888         * platform/graphics/chromium/cc/CCMainThreadTask.h: Added.
1889         (WebCore::MainThreadTask0::create):
1890         (WebCore::MainThreadTask0::MainThreadTask0):
1891         (WebCore::MainThreadTask0::performTask):
1892         (WebCore::MainThreadTask1::create):
1893         (WebCore::MainThreadTask1::MainThreadTask1):
1894         (WebCore::MainThreadTask1::performTask):
1895         (WebCore::MainThreadTask2::create):
1896         (WebCore::MainThreadTask2::MainThreadTask2):
1897         (WebCore::MainThreadTask2::performTask):
1898         (WebCore::MainThreadTask3::create):
1899         (WebCore::MainThreadTask3::MainThreadTask3):
1900         (WebCore::MainThreadTask3::performTask):
1901         (WebCore::createMainThreadTask):
1902         * platform/graphics/chromium/cc/CCThread.cpp: Added.
1903         (WebCore::CCThread::create):
1904         (WebCore::CCThread::CCThread):
1905         (WebCore::CCThread::~CCThread):
1906         (WebCore::CCThread::postTask):
1907         (WebCore::CCThread::compositorThreadStart):
1908         (WebCore::CCThread::runLoop):
1909         * platform/graphics/chromium/cc/CCThread.h: Added.
1910         (WebCore::CCThread::Task::~Task):
1911         (WebCore::CCThread::Task::instance):
1912         (WebCore::CCThread::Task::Task):
1913         (WebCore::CCThread::threadID):
1914         (WebCore::CCCompletionEvent::CCCompletionEvent):
1915         (WebCore::CCCompletionEvent::~CCCompletionEvent):
1916         (WebCore::CCCompletionEvent::wait):
1917         (WebCore::CCCompletionEvent::signal):
1918         * platform/graphics/chromium/cc/CCThreadTask.h: Added.
1919         (WebCore::CCThreadTask0::create):
1920         (WebCore::CCThreadTask0::CCThreadTask0):
1921         (WebCore::CCThreadTask0::performTask):
1922         (WebCore::CCThreadTask1::create):
1923         (WebCore::CCThreadTask1::CCThreadTask1):
1924         (WebCore::CCThreadTask1::performTask):
1925         (WebCore::CCThreadTask2::create):
1926         (WebCore::CCThreadTask2::CCThreadTask2):
1927         (WebCore::CCThreadTask2::performTask):
1928         (WebCore::CCThreadTask3::create):
1929         (WebCore::CCThreadTask3::CCThreadTask3):
1930         (WebCore::CCThreadTask3::performTask):
1931         (WebCore::createCCThreadTask):
1932
1933 2011-04-07  Ryosuke Niwa  <rniwa@webkit.org>
1934
1935         Reviewed by Eric Seidel.
1936
1937         REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
1938         https://bugs.webkit.org/show_bug.cgi?id=57872
1939
1940         r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
1941         because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
1942
1943         r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
1944         avoiding the tab span.
1945
1946         Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
1947         Also reverted r46914 for the general code path because re-creating node hierarchy duplicates nodes when
1948         we're moving nodes after the paragraph separator. Instead, we now split the tree up until the start block
1949         before moving the nodes.
1950
1951         Tests: editing/inserting/insert-paragraph-after-tab-span-and-text.html
1952                editing/inserting/insert-paragraph-separator-tab-span.html
1953
1954         * editing/DeleteSelectionCommand.cpp:
1955         (WebCore::DeleteSelectionCommand::saveTypingStyleState): Since EditingStyle's constructor avoids a tab span,
1956         no longer calls positionBeforeTabSpan on the position passed to EditingStyle's constructor.
1957         * editing/EditingStyle.cpp:
1958         (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
1959         * editing/InsertParagraphSeparatorCommand.cpp:
1960         (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
1961         separator into a paragraph separator.
1962         * editing/htmlediting.cpp:
1963         (WebCore::positionOutsideTabSpan): Renamed from positionBeforeTabSpan. Also returns the position in the parent
1964         node after the tab span if the position was at the end of the tab span.
1965         * editing/htmlediting.h:
1966
1967 2011-04-07  Jia Pu  <jpu@apple.com>
1968
1969         Reviewed by Darin Adler.
1970
1971         [Mac] Editor::setComposition() should not trigger correction panel timer.
1972         https://bugs.webkit.org/show_bug.cgi?id=58049
1973          <rdar://problem/9226305>
1974
1975         On Mac OS X that supports autocorrection panel, typing unconfirmed composition (i.e. unconfirmed Japanese or Chinese input)
1976         should not start autocorrection timer. We added a member variable, m_shouldPreventSpellChecking, to TypingCommand. 
1977         When this value is true, markMisspellingsAfterTyping() will not be called in TypingCommand::typingAddedToOpenCommand().
1978         m_shouldPreventSpellChecking is set to true in the TypingCommand objects created by Editor::setComposition().
1979
1980         No new tests. No deterministically reproducible test case. Patch is based on static code analysis. Testing this also requires firing
1981         autocorrection panel timer, which can not be easily done in automated fashion.
1982
1983         * editing/Editor.cpp:
1984         (WebCore::Editor::deleteWithDirection):
1985         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1986         (WebCore::Editor::confirmComposition):
1987         (WebCore::Editor::setComposition):
1988         * editing/EditorCommand.cpp:
1989         (WebCore::executeDelete):
1990         * editing/TypingCommand.cpp:
1991         (WebCore::TypingCommand::TypingCommand):
1992         (WebCore::TypingCommand::deleteSelection):
1993         (WebCore::TypingCommand::deleteKeyPressed):
1994         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1995         (WebCore::TypingCommand::insertText):
1996         (WebCore::TypingCommand::insertLineBreak):
1997         (WebCore::TypingCommand::insertParagraphSeparator):
1998         (WebCore::TypingCommand::typingAddedToOpenCommand):
1999         * editing/TypingCommand.h:
2000         (WebCore::TypingCommand::create):
2001         (WebCore::TypingCommand::setShouldPreventSpellChecking):
2002
2003 2011-04-07  John Bauman  <jbauman@chromium.org>
2004
2005         Reviewed by Kenneth Russell.
2006
2007         clearIfComposited call is really slow
2008         https://bugs.webkit.org/show_bug.cgi?id=57999
2009
2010         Move getContextAttributes call after the if, so it isn't called nearly as often.
2011
2012         No new tests.
2013
2014         * html/canvas/WebGLRenderingContext.cpp:
2015         (WebCore::WebGLRenderingContext::clearIfComposited):
2016
2017 2011-04-07  Luke Macpherson   <macpherson@chromium.org>
2018
2019         Reviewed by Dimitri Glazkov.
2020
2021         Implement Backgroun and Mask properties in CSSStyleApplyProperty
2022         https://bugs.webkit.org/show_bug.cgi?id=57922
2023
2024         No tests added as no behavioral changes.
2025
2026         * css/CSSStyleApplyProperty.cpp:
2027         Added ApplyPropertyFillLayer test to handle Background and Mask CSS Properties.
2028         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2029         Added constructor calls to set up:
2030           CSSPropertyBackgroundAttachment
2031           CSSPropertyBackgroundClip
2032           CSSPropertyWebkitBackgroundClip
2033           CSSPropertyWebkitBackgroundComposite
2034           CSSPropertyBackgroundOrigin
2035           CSSPropertyWebkitBackgroundOrigin
2036           CSSPropertyBackgroundSize
2037           CSSPropertyWebkitBackgroundSize
2038           CSSPropertyWebkitMaskAttachment
2039           CSSPropertyWebkitMaskClip
2040           CSSPropertyWebkitMaskComposite
2041           CSSPropertyWebkitMaskOrigin
2042           CSSPropertyWebkitMaskSize
2043         * css/CSSStyleApplyProperty.h:
2044         (WebCore::CSSStyleApplyProperty::setPropertyValue):
2045         Add function to specify an equivalent property value in the lookup table.
2046         * css/CSSStyleSelector.cpp:
2047         (WebCore::CSSStyleSelector::applyProperty):
2048         Remove sections now implemented by CSSStyleApplyProperty.
2049         * css/CSSStyleSelector.h:
2050         Make CSSStyleApplyProperty a friend class so that the mapFill* functions are accessible.
2051
2052 2011-04-04  Eric Seidel  <eric@webkit.org>
2053
2054         Reviewed by Ryosuke Niwa.
2055
2056         Split run storage out from BidiResolver into a new BidiRunList class
2057         https://bugs.webkit.org/show_bug.cgi?id=57764
2058
2059         Part of what makes BidiResolver and InlineIterator so difficult to understand
2060         (and bug 50912 so difficult to fix) is that BidiResolver is both a state machine
2061         for the Unicode Bidi Algorithm (UBA) as well as storage for the resulting
2062         BidiRuns from the algorithm.  This patch breaks the storage aspect off
2063         into its own class BidiRunList.
2064
2065         This patch is only a start.  It does not actually fix the problematic ownership
2066         relationship, but it does make it possible to fix such in a second patch.
2067
2068         The run pointers and addRun/prependRun, etc. were already a tightly coupled
2069         logical subset of the BidiResolver class, so moving them into their own class
2070         was both obvious and easy.  The only piece of logic I had to move was that
2071         deleteRuns() had a side-effect of setting the m_emptyRun bit on the resolver.
2072
2073         I believe this deleteRuns side-effect was only ever used for one place
2074         (right after findNextLineBreak) and that it's only needed because
2075         findNextLineBreak can sometimes create bidi runs.  Run creation appears to be
2076         an unintentional side-effect of how InlineIterator calls through to BidiResolver
2077         as part of bidiNext and not a desired effect of the code.  I have added the call
2078         to markCurrentRunEmpty to both places deleteRuns was called (where the resolver
2079         could get re-used) as a safety precaution.  We could replace both with ASSERTs
2080         in a later patch.
2081
2082         I suspect there may be a small performance win from further refactoring so that
2083         findNextLineBreak does not need to create BidiRuns.
2084
2085         As I commented in the code, callers should own their own BidiRunList which they
2086         pass to BidiResolver::createBidiRunsForLine.  I attempted to implement that in
2087         an earlier version of this patch, but it was too complicated with the current
2088         twisted dependencies between InlineIterator/bidiNext and InlineBidiResolver.
2089         raise/lowerExplicitEmbeddingLevel are called unconditionally
2090         from commitExplicitEmbedding (which is called by bidiNext) and expect to have
2091         access to a runs list even in cases where we don't want any runs (findNextLineBreak).
2092
2093         I also cleaned up some of the callers to pass around BidiRunList objects instead
2094         of InlineBidiResolvers now that they're separate objects.
2095
2096         * GNUmakefile.am:
2097         * WebCore.gypi:
2098         * WebCore.pro:
2099         * WebCore.vcproj/WebCore.vcproj:
2100         * WebCore.xcodeproj/project.pbxproj:
2101         * platform/graphics/GraphicsContext.cpp:
2102         (WebCore::GraphicsContext::drawBidiText):
2103         * platform/text/BidiResolver.h:
2104         (WebCore::BidiResolver::BidiResolver):
2105         (WebCore::BidiResolver::runs):
2106         (WebCore::BidiResolver::markCurrentRunEmpty):
2107         (WebCore::::appendRun):
2108         (WebCore::::lowerExplicitEmbeddingLevel):
2109         (WebCore::::raiseExplicitEmbeddingLevel):
2110         (WebCore::::reorderRunsFromLevels):
2111         (WebCore::::createBidiRunsForLine):
2112         * rendering/InlineIterator.h:
2113         (WebCore::InlineBidiResolver::appendRun):
2114         * rendering/RenderBlock.h:
2115         * rendering/RenderBlockLineLayout.cpp:
2116         (WebCore::createRun):
2117         (WebCore::RenderBlock::appendRunsForObject):
2118         (WebCore::reachedEndOfTextRenderer):
2119         (WebCore::RenderBlock::handleTrailingSpaces):
2120         (WebCore::RenderBlock::layoutInlineChildren):
2121
2122 2011-04-07  Naoki Takano  <takano.naoki@gmail.com>
2123
2124         Reviewed by Adam Barth.
2125
2126         [Chromium] Fix relocation problem of popup window which introduces autofill popup sometimes moves to screen's top left corner.
2127         https://bugs.webkit.org/show_bug.cgi?id=57911
2128         http://code.google.com/p/chromium/issues/detail?id=78073
2129
2130         Manual test added: manual-tests/autofill-popup-location.html
2131
2132         Originally only height is checked so that it introduces the bug.
2133         So I changed it to check both width and height as size.
2134
2135         * manual-tests/autofill-popup-location.html: Added.
2136         * platform/chromium/PopupMenuChromium.cpp:
2137         (WebCore::PopupContainer::refresh): Check window size between original and new before calling setFrameRect().
2138
2139 2011-04-07  Adam Barth  <abarth@webkit.org>
2140
2141         Reviewed by Eric Seidel.
2142
2143         Implement img-src style-src and font-src
2144         https://bugs.webkit.org/show_bug.cgi?id=58018
2145
2146         These are pretty straight forward given the rest of the infrastructure
2147         we've built so far.
2148
2149         Tests: http/tests/security/contentSecurityPolicy/image-allowed.html
2150                http/tests/security/contentSecurityPolicy/image-blocked.html
2151                http/tests/security/contentSecurityPolicy/style-allowed.html
2152                http/tests/security/contentSecurityPolicy/style-blocked.html
2153                http/tests/security/contentSecurityPolicy/xsl-allowed.php
2154                http/tests/security/contentSecurityPolicy/xsl-blocked.php
2155
2156         * loader/cache/CachedResourceLoader.cpp:
2157         (WebCore::CachedResourceLoader::canRequest):
2158         * page/ContentSecurityPolicy.cpp:
2159         (WebCore::ContentSecurityPolicy::allowImageFromSource):
2160         (WebCore::ContentSecurityPolicy::allowStyleFromSource):
2161         (WebCore::ContentSecurityPolicy::allowFontFromSource):
2162         (WebCore::ContentSecurityPolicy::addDirective):
2163         * page/ContentSecurityPolicy.h:
2164
2165 2011-04-07  David Levin  <levin@chromium.org>
2166
2167         Reviewed by Darin Adler.
2168
2169         Make IconSnapshot and PageURLRecord member variables private.
2170         https://bugs.webkit.org/show_bug.cgi?id=58080
2171
2172         No change in functionality so no new tests.
2173
2174         * loader/icon/IconDatabase.cpp:
2175         (WebCore::IconDatabase::writeToDatabase): Changed to used the accessor functions.
2176         (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase): Ditto.
2177         * loader/icon/IconRecord.h:
2178         (WebCore::IconSnapshot::IconSnapshot): Changed to use the new member variable names.
2179         (WebCore::IconSnapshot::iconURL): Expose the property.
2180         (WebCore::IconSnapshot::timestamp): Ditto.
2181         (WebCore::IconSnapshot::data): Ditto.
2182         * loader/icon/PageURLRecord.h:
2183         (WebCore::PageURLSnapshot::PageURLSnapshot): Changed to use the new member variable names.
2184         (WebCore::PageURLSnapshot::pageURL): Expose the property.
2185         (WebCore::PageURLSnapshot::iconURL): Ditto.
2186
2187 2011-04-07  Dan Bernstein  <mitz@apple.com>
2188
2189         Build fix.
2190
2191         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2192         (WebCore::GraphicsContext::roundToDevicePixels):
2193
2194 2011-04-07  Eric Seidel  <eric@webkit.org>
2195
2196         Reviewed by Adam Barth.
2197
2198         Add stub support for generating Gtk build system from gyp
2199         https://bugs.webkit.org/show_bug.cgi?id=58086
2200
2201         This does not produce a buildable WebCore, but it
2202         does allow running gyp/configure --port=gtk and having
2203         it generate a gtk.Makefile which we can use for testing
2204         the rest of the plumbing.
2205
2206         * gyp/gtk.gyp: Added.
2207
2208 2011-04-07  David Hyatt  <hyatt@apple.com>
2209
2210         Reviewed by Dan Bernstein.
2211
2212         https://bugs.webkit.org/show_bug.cgi?id=57736
2213         
2214         Crash on openstreetmap.org while using the map. Fix a bad interaction between the positioned movement layout
2215         optimization and the simplified layout optimization that could lead to blocks remaining marked as dirty when
2216         layout finished. This would eventually lead to an inability to properly determine the correct layout root and
2217         would cause a deleted root to be used later on.
2218
2219         Added fast/block/positioning/complex-positioned-movement.html.
2220
2221         * page/FrameView.cpp:
2222         (WebCore::FrameView::scheduleRelayoutOfSubtree):
2223         Add asserts to catch cases in the future where a layout root is set that has a dirty containing block.
2224     
2225         * rendering/RenderBlock.cpp:
2226         (WebCore::RenderBlock::simplifiedLayout):
2227         Change simplified layout so that the positioned movement optimization no longer clears the other layout
2228         flags. This will ensure that we still lay out our descendants if they need it.
2229         
2230         (WebCore::RenderBlock::layoutPositionedObjects):
2231         Changed to clear our layout flags now if the positioned movement is successful, since tryLayoutDoingPositionedMovementOnly
2232         no longer does the clear.
2233     
2234         * rendering/RenderBox.h:
2235         (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly):
2236         tryLayoutDoingPositionedMovementOnly now returns a boolean indicating success or failure.  On success it no longer
2237         does setNeedsLayout(false), but instead will let the caller take care of it. This way the caller can still look at
2238         the other flags in case other kinds of layout are still needed.
2239     
2240         * rendering/RenderObject.h:
2241         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
2242         (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
2243         Changed these methods to only set their respective flags and not to try to be clever about avoiding propagation.
2244
2245 2011-04-07  Andrew Scherkus  <scherkus@chromium.org>
2246
2247         Revert ENABLE_TRACK patch due to compile failures.
2248
2249         * CMakeLists.txt:
2250         * Configurations/FeatureDefines.xcconfig:
2251         * DerivedSources.make:
2252         * GNUmakefile.am:
2253         * WebCore.gypi:
2254         * WebCore.xcodeproj/project.pbxproj:
2255         * features.pri:
2256         * html/HTMLAttributeNames.in:
2257         * html/HTMLTagNames.in:
2258         * html/HTMLTrackElement.cpp: Removed.
2259         * html/HTMLTrackElement.h: Removed.
2260         * html/HTMLTrackElement.idl: Removed.
2261
2262 2011-04-07  Dan Bernstein  <mitz@apple.com>
2263
2264         Reviewed by Simon Fraser.
2265
2266         <rdar://problem/9018212> Underline thickness is not uniform under non-integral scale factor
2267         https://bugs.webkit.org/show_bug.cgi?id=58083
2268
2269         Test: fast/text/decorations-transformed.html
2270
2271         * platform/graphics/GraphicsContext.h: Added a RoundingMode enum with two values. RoundAllSides
2272         is the existing rounding mode, where each side of the rectangle snaps to the nearest pixel
2273         gridline. RoundOriginAndDimensions snaps the origin to the nearest pixel gridpoint and rounds
2274         the width and the height. In this new mode, translating a rectangle in user space never changes
2275         its dimensions in device pixels.
2276         * platform/graphics/cg/GraphicsContextCG.cpp:
2277         (WebCore::GraphicsContext::roundToDevicePixels): Implemented RoundOriginAndDimensions.
2278         (WebCore::GraphicsContext::drawLineForText): Use RoundOriginAndDimensions, thus ensuring that
2279         all underlines have the same thickness in device pixels.
2280         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
2281         (WebCore::GraphicsContext::roundToDevicePixels): Added RoundingMode parameter, but did not implement it.
2282         * platform/graphics/qt/GraphicsContextQt.cpp:
2283         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2284         * platform/graphics/skia/GraphicsContextSkia.cpp:
2285         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2286         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2287         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2288         * platform/graphics/wx/GraphicsContextWx.cpp:
2289         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2290         * rendering/InlineTextBox.cpp:
2291         (WebCore::InlineTextBox::paintDecoration):
2292
2293 2011-04-06  Vitaly Repeshko  <vitalyr@chromium.org>
2294
2295         Reviewed by Nate Chapin.
2296
2297         [V8] Remove custom DOMImplementation getter on Document.
2298         https://bugs.webkit.org/show_bug.cgi?id=57991
2299
2300         The custom getter is no longer required because DOMImplementation
2301         objects are now created per document.
2302
2303         Test: fast/dom/DOMImplementation/implementation-identity.html
2304
2305         * bindings/scripts/CodeGeneratorV8.pm:
2306         * bindings/v8/custom/V8DocumentCustom.cpp:
2307         * dom/Document.idl:
2308
2309 2011-04-07  Sergey Glazunov  <serg.glazunov@gmail.com>
2310
2311         Reviewed by Dimitri Glazkov.
2312
2313         setHasID() is only called for styled elements
2314         https://bugs.webkit.org/show_bug.cgi?id=57267
2315
2316         Test: fast/dom/non-styled-element-id-crash.html
2317
2318         * dom/Element.cpp:
2319         (WebCore::Element::attributeChanged):
2320         (WebCore::Element::idAttributeChanged):
2321         * dom/Element.h:
2322         * dom/StyledElement.cpp:
2323         (WebCore::StyledElement::parseMappedAttribute):
2324
2325 2011-04-07  Jer Noble  <jer.noble@apple.com>
2326
2327         Reviewed by Eric Carlson.
2328
2329         HTMLVideoElement::webkitEnterFullscreen does not use new Full Screen API when available.
2330         https://bugs.webkit.org/show_bug.cgi?id=58070
2331
2332         Make the HTMLMediaElement full screen functions call into the new Full Screen API when
2333         FULLSCREEN_API is enabled.
2334
2335         * html/HTMLMediaElement.cpp:
2336         (WebCore::HTMLMediaElement::enterFullscreen):
2337         (WebCore::HTMLMediaElement::exitFullscreen):
2338
2339 2011-04-07  Adam Barth  <abarth@webkit.org>
2340
2341         Reviewed by Eric Seidel.
2342
2343         Implement CSP's options directive
2344         https://bugs.webkit.org/show_bug.cgi?id=58014
2345
2346         This patch contains the full options parser, but we only have enough of
2347         CSP implemented to see the effects of disable-xss-protection.  Will
2348         need to do some more work before we can see eval-script in action.
2349
2350         Tests: http/tests/security/contentSecurityPolicy/inline-script-allowed.html
2351                http/tests/security/contentSecurityPolicy/inline-script-blocked-goofy.html
2352
2353         * page/ContentSecurityPolicy.cpp:
2354         (WebCore::CSPOptions::CSPOptions):
2355         (WebCore::CSPOptions::disableXSSProtection):
2356         (WebCore::CSPOptions::evalScript):
2357         (WebCore::CSPOptions::parse):
2358         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
2359         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
2360         (WebCore::ContentSecurityPolicy::allowInlineScript):
2361         (WebCore::ContentSecurityPolicy::addDirective):
2362         * page/ContentSecurityPolicy.h:
2363
2364 2011-04-07  Alexey Proskuryakov  <ap@apple.com>
2365
2366         Reviewed by Anders Carlsson.
2367
2368         REGRESSION (WebKit2): Reverse conversion doesn't work in Kotoeri
2369         https://bugs.webkit.org/show_bug.cgi?id=58066
2370         <rdar://problem/8965302>
2371
2372         * platform/mac/HTMLConverter.h:
2373         * platform/mac/HTMLConverter.mm: (+[WebHTMLConverter editingAttributedStringFromRange:]):
2374         Changed editingAttributedStringFromRange: to use WebCore::Range instead of DOMRange, since
2375         it's now used in WebKit2.
2376
2377 2011-04-07  Andy Estes  <aestes@apple.com>
2378
2379         Reviewed by Darin Adler.
2380
2381         REGRESSION (r64712): Microsoft Outlook 2011: original message contents
2382         not included when replying to an email.
2383         https://bugs.webkit.org/show_bug.cgi?id=57794
2384         
2385         * WebCore.exp.in:
2386         * loader/FrameLoader.cpp:
2387         (WebCore::FrameLoader::finishedParsing): Call Frame::injectUserScripts()
2388         before checking if the FrameLoader is parsing the initial empty document.
2389         This allows user scripts to be injected at the end of document parsing
2390         (if the setting is enabled).
2391         * page/Frame.cpp:
2392         (WebCore::Frame::injectUserScripts): Do not inject scripts if this
2393         feature is disabled on the initial empty document.
2394         * page/Settings.cpp:
2395         (WebCore::Settings::Settings):
2396         * page/Settings.h: Add a setting for injecting user scripts into the
2397         initial empty document (defaults to false).
2398         (WebCore::Settings::setInjectUserScriptsInInitialEmptyDocument):
2399         (WebCore::Settings::injectUserScriptsInInitialEmptyDocument):
2400         * platform/mac/RuntimeApplicationChecks.h:
2401         * platform/mac/RuntimeApplicationChecks.mm:
2402         (WebCore::applicationIsMicrosoftOutlook): Check if the embedding
2403         application is Microsoft Outlook.
2404
2405 2011-04-06  Jer Noble  <jer.noble@apple.com>
2406
2407         Reviewed by Maciej Stachowiak.
2408
2409         AVF: MediaPlayerPrivateAVFoundation never reaches playable state.
2410         https://bugs.webkit.org/show_bug.cgi?id=57962
2411
2412         Add support for a new AVPlayerItem API which will notify clients when their
2413         seek completes.  This requires a new Notification type to be passed to the main
2414         thread in MediaPlayerPrivateAVFoundation.
2415
2416         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2417         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Added.
2418         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification): Added two new
2419             overloaded functions which take a Notification; and a Notification::Type and boolean.
2420         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Support new SeekCompleted 
2421             Notification type.
2422         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2423         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification): Added one new constructor.
2424         (WebCore::MediaPlayerPrivateAVFoundation::Notification::finished): Added ivar and accessor.
2425         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2426         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Call new AVPlayerItem API.
2427         (-[WebCoreAVFMovieObserver seekCompleted:]): Added.
2428
2429 2011-04-07  Nancy Piedra  <nancy.piedra@nokia.com>
2430
2431         Reviewed by Eric Carlson.
2432
2433         Parse quotes from content type parameters
2434         https://bugs.webkit.org/show_bug.cgi?id=53275
2435
2436         This functionality is tested in video-can-play-type.html layout test
2437         where I've added codecs parameter with good and bad formatting.
2438
2439         * platform/ContentType.cpp:
2440         (WebCore::ContentType::parameter):
2441
2442 2011-04-07  Pavel Feldman  <pfeldman@google.com>
2443
2444         Reviewed by Yury Semikhatsky.
2445
2446         Web Inspector: remove "enabled" from the setBreakpoint protocol.
2447         https://bugs.webkit.org/show_bug.cgi?id=58047
2448
2449         * bindings/js/ScriptDebugServer.cpp:
2450         (WebCore::ScriptDebugServer::hasBreakpoint):
2451         * bindings/v8/DebuggerScript.js:
2452         ():
2453         * bindings/v8/ScriptDebugServer.cpp:
2454         (WebCore::ScriptDebugServer::setBreakpoint):
2455         * inspector/Inspector.json:
2456         * inspector/InspectorDebuggerAgent.cpp:
2457         (WebCore::buildObjectForBreakpointCookie):
2458         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2459         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2460         (WebCore::InspectorDebuggerAgent::continueToLocation):
2461         (WebCore::InspectorDebuggerAgent::didParseSource):
2462         * inspector/InspectorDebuggerAgent.h:
2463         * inspector/ScriptBreakpoint.h:
2464         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
2465         * inspector/front-end/DebuggerModel.js:
2466         (WebInspector.DebuggerModel.prototype.setBreakpoint):
2467         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2468         * inspector/front-end/DebuggerPresentationModel.js:
2469         (WebInspector.DebuggerPresentationModel):
2470         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
2471         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
2472         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.callback):
2473         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
2474         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
2475         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
2476         (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger):
2477         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled.afterUpdate):
2478         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
2479         (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
2480         (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
2481         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
2482         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
2483         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
2484         (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
2485         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpointsFromSettings):
2486         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
2487         (WebInspector.DebuggerPresentationModel.prototype._reset):
2488         (WebInspector.PresentationBreakpoint):
2489
2490 2011-04-07  Dan Bernstein  <mitz@apple.com>
2491
2492         Reviewed by Adam Roben.
2493
2494         Removed a redundant line of code.
2495
2496         * rendering/RenderInline.cpp:
2497         (WebCore::RenderInline::updateAlwaysCreateLineBoxes): No need to compare line gap values, as
2498         this is covered by the earlier hasIdenticalAscentDescentAndLineGap() check.
2499
2500 2011-04-07  Liang Qi  <liang.qi@nokia.com>
2501
2502         Reviewed by Laszlo Gombos.
2503
2504         [Qt][Symbian] Enable webkit build with GCCE on Symbian.
2505         https://bugs.webkit.org/show_bug.cgi?id=57841
2506
2507         * WebCore.pri: Thanks for Norbert Leser  <norbert.leser@nokia.com> who checked RVCT part.
2508         --rw-base value in QMAKE_LFLAGS.ARMCC and -Tdata value in QMAKE_LFLAGS.GCCE are updated
2509         to 0x1000000 together. They need to be updated in the future when WebKit grows.
2510
2511 2011-04-06  Pavel Feldman  <pfeldman@google.com>
2512
2513         Reviewed by Yury Semikhatsky.
2514
2515         Web Inspector: get rid of Breakpoint.js.
2516         https://bugs.webkit.org/show_bug.cgi?id=57949
2517
2518         * WebCore.gypi:
2519         * WebCore.vcproj/WebCore.vcproj:
2520         * inspector/front-end/Breakpoint.js: Removed.
2521         * inspector/front-end/BreakpointsSidebarPane.js:
2522         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint):
2523         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint.didLoadSnippet):
2524         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint):
2525         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compareBreakpoints):
2526         * inspector/front-end/DebuggerModel.js:
2527         (WebInspector.DebuggerModel):
2528         (WebInspector.DebuggerModel.prototype._debuggerWasDisabled):
2529         (WebInspector.DebuggerModel.prototype.setBreakpoint.didSetBreakpoint):
2530         (WebInspector.DebuggerModel.prototype.setBreakpoint):
2531         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2532         (WebInspector.DebuggerModel.prototype.removeBreakpoint):
2533         (WebInspector.DebuggerModel.prototype._breakpointResolved):
2534         (WebInspector.DebuggerModel.prototype.reset):
2535         * inspector/front-end/DebuggerPresentationModel.js:
2536         (WebInspector.DebuggerPresentationModel):
2537         (WebInspector.DebuggerPresentationModel.prototype._refreshBreakpoints):
2538         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
2539         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
2540         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.didSetBreakpoint):
2541         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
2542         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
2543         (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
2544         (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
2545         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
2546         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
2547         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
2548         (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
2549         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
2550         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoint):
2551         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
2552         (WebInspector.DebuggerPresentationModel.prototype._reset):
2553         (WebInspector.PresentationBreakpoint):
2554         (WebInspector.PresentationBreakpoint.prototype.get sourceFile):
2555         (WebInspector.PresentationBreakpoint.prototype.get url):
2556         (WebInspector.PresentationBreakpoint.prototype.get resolved):
2557         (WebInspector.PresentationBreakpoint.prototype.loadSnippet):
2558         * inspector/front-end/ResourceTreeModel.js:
2559         (WebInspector.ResourceTreeModel):
2560         (WebInspector.ResourceTreeModel.prototype._onResourceStarted):
2561         (WebInspector.ResourceTreeModel.prototype._addResourceToFrame):
2562         * inspector/front-end/ScriptsPanel.js:
2563         (WebInspector.ScriptsPanel):
2564         (WebInspector.ScriptsPanel.prototype._breakpointUpdated):
2565         (WebInspector.ScriptsPanel.prototype.reset):
2566         * inspector/front-end/WebKit.qrc:
2567         * inspector/front-end/inspector.html:
2568
2569 2011-04-07  Yury Semikhatsky  <yurys@chromium.org>
2570
2571         Reviewed by Pavel Feldman.
2572
2573         Web Inspector: console messages names should adhere to the common naming style
2574         https://bugs.webkit.org/show_bug.cgi?id=58042
2575
2576         * inspector/ConsoleMessage.cpp:
2577         (WebCore::ConsoleMessage::addToFrontend):
2578         (WebCore::ConsoleMessage::updateRepeatCountInConsole):
2579         * inspector/Inspector.json:
2580         * inspector/InspectorConsoleAgent.cpp:
2581         (WebCore::InspectorConsoleAgent::clearConsoleMessages):
2582         * inspector/front-end/ConsoleView.js:
2583         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded):
2584         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageRepeatCountUpdated):
2585         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messagesCleared):
2586         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
2587
2588 2011-04-06  Ilya Tikhonovsky  <loislo@chromium.org>
2589
2590         Reviewed by Yury Semikhatsky.
2591
2592         Web Inspector: migrate Inspector protocol messages format to JSON-RPC.
2593         https://bugs.webkit.org/show_bug.cgi?id=57957
2594
2595         There is not a significant difference between  inspector messages spec and and JSON-RPC 2.0 messages spec.
2596         Also JSON-RPC has a pretty clear specification for error descriptions which we haven't.
2597         It was decided that we will use it.
2598
2599         the list of renames:
2600         1) type-> /dev/null
2601         2) domain + '.' + event => method // for events
2602         3) domain + '.' + command => method // for requests
2603         4) requestId => id // for responses
2604         5) arguments => params // for requests
2605         6) data => params // for events
2606         7) body => result // for responses
2607
2608         protocolErrors and error properties will be converted to JSON-RPC error format.
2609         The order of properties in messages also will be adjusted.
2610         The only thing that looks unnecessary is jsonrpc property.
2611
2612         * inspector/CodeGeneratorInspector.pm:
2613
2614 2011-04-07  Ryosuke Niwa  <rniwa@webkit.org>
2615
2616         Reviewed by Eric Seidel.
2617
2618         Add functions to update left and right offsets to LineOffsets
2619         https://bugs.webkit.org/show_bug.cgi?id=58028
2620
2621         Added update() and shrinkWidthForNewFloatIfNeeded(FloatingObject*) to LineOffsets,
2622         which are used to update m_left and m_right. Also added m_block and m_isFirstLine
2623         member variables to LineOffsets so that users of LineOffsets don't have to pass them around.
2624
2625         * rendering/RenderBlock.h:
2626         * rendering/RenderBlockLineLayout.cpp:
2627         (WebCore::RenderBlock::skipLeadingWhitespace): No longer passes firstLine to positionNewFloatOnLine.
2628         (WebCore::LineOffsets::LineOffsets): Takes RenderBlock* and isFirstLine instead of left and right offsets.
2629         (WebCore::LineOffsets::update): Extracted from findNextLineBreak and positionNewFloatOnLine.
2630         (WebCore::LineOffsets::shrinkWidthForNewFloatIfNeeded): Extracted from positionNewFloatOnLine.
2631         (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
2632         (WebCore::RenderBlock::positionNewFloatOnLine): Calls shrinkWidthForNewFloatIfNeeded and update and
2633         no longer passes firstLine around.
2634
2635 2011-04-06  Pavel Feldman  <pfeldman@google.com>
2636
2637         Reviewed by Yury Semikhatsky.
2638
2639         Web Inspector: migrate debugger domain to the unified breakpoint location notion.
2640         https://bugs.webkit.org/show_bug.cgi?id=57928
2641
2642         * inspector/Inspector.json:
2643         * inspector/InspectorDebuggerAgent.cpp:
2644         (WebCore::buildObjectForBreakpointCookie):
2645         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2646         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2647         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2648         (WebCore::InspectorDebuggerAgent::didParseSource):
2649         * inspector/InspectorDebuggerAgent.h:
2650         * inspector/front-end/Breakpoint.js:
2651         (WebInspector.Breakpoint):
2652         * inspector/front-end/DebuggerModel.js:
2653         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2654         (WebInspector.DebuggerModel.prototype._breakpointResolved):
2655
2656 2011-04-07  Andreas Kling  <andreas.kling@nokia.com>
2657
2658         Reviewed by Benjamin Poulain.
2659
2660         [Qt] Mask the QStyle::State_Horizontal hint for vertical scrollbars.
2661
2662         When initializing a QStyleOptionSlider from a widget, the State_Horizontal
2663         hint may get set depending on how that widget is laid out in its parent.
2664         If this happens when drawing a vertical scrollbar, the hint is never
2665         cleared and we end up painting a vertical scrollbar with horizontal arrows.
2666
2667         Covered by pixel tests which should no longer paint silly scrollbars.
2668
2669         * platform/qt/ScrollbarThemeQt.cpp:
2670         (WebCore::styleOptionSlider):
2671
2672 2011-04-07  Adam Barth  <abarth@webkit.org>
2673
2674         Reviewed by Eric Seidel.
2675
2676         script-src should block inline script
2677         https://bugs.webkit.org/show_bug.cgi?id=58012
2678
2679         Block inline scripts at the ScriptElement layer.  This should catch
2680         exactly the scripts we want to catch.
2681
2682         Test: http/tests/security/contentSecurityPolicy/inline-script-blocked.html
2683
2684         * dom/Document.cpp:
2685         (WebCore::Document::processHttpEquiv):
2686             - This patch also adds the ability to supply a CSP policy via a
2687               <meta> tag.  We'll update the name of the header once we've
2688               finished implementing the spec.
2689         * dom/ScriptElement.cpp:
2690         (WebCore::ScriptElement::executeScript):
2691         * page/ContentSecurityPolicy.cpp:
2692         (WebCore::ContentSecurityPolicy::allowInlineScript):
2693         * page/ContentSecurityPolicy.h:
2694
2695 2011-04-07  Alice Boxhall  <aboxhall@chromium.org>
2696
2697         Reviewed by Ryosuke Niwa.
2698
2699         Move the MouseEventWithHitTestResults::targetNode() method on to EventHandler.
2700         https://bugs.webkit.org/show_bug.cgi?id=57921
2701
2702         Moves the MouseEventWithHitTestResults::targetNode() method on to EventHandler, so
2703         that the same logic can be used for a HitTestResult.
2704
2705         No visible changes, just cleanup, so no tests.
2706
2707         * page/EventHandler.cpp:
2708         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
2709         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
2710         (WebCore::EventHandler::handleMousePressEventTripleClick):
2711         (WebCore::EventHandler::handleMousePressEventSingleClick):
2712         (WebCore::EventHandler::handleMousePressEvent):
2713         (WebCore::EventHandler::handleMouseDraggedEvent):
2714         (WebCore::EventHandler::handleMouseReleaseEvent):
2715         (WebCore::EventHandler::subframeForHitTestResult):
2716         Made public static member, so that it can access targetNode(), and be accessed by
2717         webkitwebview in gtk.
2718         (WebCore::EventHandler::selectCursor):
2719         (WebCore::EventHandler::targetNode):
2720         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2721         (WebCore::EventHandler::handleMouseMoveEvent):
2722         (WebCore::EventHandler::updateDragAndDrop):
2723         (WebCore::EventHandler::sendContextMenuEvent):
2724         * page/EventHandler.h:
2725         * page/MouseEventWithHitTestResults.cpp:
2726         (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
2727         * page/MouseEventWithHitTestResults.h:
2728         * page/android/EventHandlerAndroid.cpp:
2729         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2730         * page/brew/EventHandlerBrew.cpp:
2731         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2732         * page/chromium/EventHandlerChromium.cpp:
2733         (WebCore::EventHandler::passMousePressEventToSubframe):
2734         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2735         * page/efl/EventHandlerEfl.cpp:
2736         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2737         * page/gtk/EventHandlerGtk.cpp:
2738         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2739         * page/haiku/EventHandlerHaiku.cpp:
2740         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2741         * page/mac/EventHandlerMac.mm:
2742         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2743         (WebCore::EventHandler::passSubframeEventToSubframe):
2744         * page/wx/EventHandlerWx.cpp:
2745         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2746
2747 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
2748
2749         Reviewed by Pavel Feldman.
2750
2751         Web Inspector: build mapping for formatted scripts based on keywords positions.
2752         https://bugs.webkit.org/show_bug.cgi?id=57936
2753
2754         Mapping based on [\$\.\w]+ was not accurate because string literals representation
2755         may be different in original and formatted scripts.
2756
2757         * inspector/front-end/ScriptFormatterWorker.js:
2758         (buildMapping.regexp.b):
2759         (buildMapping):
2760
2761 2011-04-07  Kent Tamura  <tkent@chromium.org>
2762
2763         Reviewed by Dimitri Glazkov.
2764
2765         Spinbuttons become unclickable if right padding is large.
2766         https://bugs.webkit.org/show_bug.cgi?id=56298
2767
2768         An inner-spin-button is put on the right border and ignores right
2769         padding in RenderTextControlSingleLine::layout(), but forwardEvent()
2770         checks if a point is in an area just right of an internal text block.
2771         This inconsistency caused a bug that an inner-spin-button with large
2772         padding didn't receive mouse events.
2773
2774         To fix this bug, we render spin buttons as layers, and remove manual
2775         event forwarding code.
2776
2777         Test: fast/forms/input-number-large-padding.html
2778
2779         * css/html.css: Add "position:relative" to make a spin-button a layer.
2780         (input::-webkit-inner-spin-button):
2781         (input::-webkit-outer-spin-button):
2782         * rendering/RenderTextControlSingleLine.cpp:
2783         (WebCore::RenderTextControlSingleLine::forwardEvent):
2784           Remove manual event forwarding code.
2785
2786 2011-04-06  Adam Barth  <abarth@webkit.org>
2787
2788         Reviewed by Eric Seidel.
2789
2790         CSP object-src should block plugin loads
2791         https://bugs.webkit.org/show_bug.cgi?id=57283
2792
2793         This change is pretty straight-forward.  It's slighly unclear to me
2794         whether this patch is correct w.r.t. the code in DocumentWriter.  I've
2795         added a FIXME comment, and I'll investigate that case more in the future.
2796
2797         Test: http/tests/security/contentSecurityPolicy/object-src-none.html
2798
2799         * loader/DocumentWriter.cpp:
2800         (WebCore::DocumentWriter::begin):
2801         * loader/SubframeLoader.cpp:
2802         (WebCore::SubframeLoader::requestPlugin):
2803         * page/ContentSecurityPolicy.cpp:
2804         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
2805         (WebCore::ContentSecurityPolicy::addDirective):
2806         * page/ContentSecurityPolicy.h:
2807
2808 2011-04-06  Beth Dakin  <bdakin@apple.com>
2809
2810         Reviewed by Dan Bernstein.
2811
2812         https://bugs.webkit.org/show_bug.cgi?id=58009
2813         Frame::scalePage() results in visual artifacts with scale factors less than 1
2814         -and corresponding-
2815         <rdar://problem/8683230>
2816
2817         Fall into the case where we fill with a background base color when there is a page 
2818         scale factor that is less than 1.
2819         * rendering/RenderView.cpp:
2820         (WebCore::RenderView::paintBoxDecorations):
2821
2822 2011-04-06  Jer Noble  <jer.noble@apple.com>
2823
2824         Reviewed by Darin Adler.
2825
2826         AVF: MediaPlayerPrivateAVFoundationObjC should not use -[AVPlayerItem isPlaybackBufferEmpty]
2827         https://bugs.webkit.org/show_bug.cgi?id=57982
2828
2829         Query our cached loaded time array instead of asking AVPlayerItem if its buffer is empty.
2830
2831         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2832         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
2833
2834 2011-04-06  Jer Noble  <jer.noble@apple.com>
2835
2836         Reviewed by Eric Carlson.
2837
2838         MediaPlayerPrivateAVFoundation does not change rate due to setRate().
2839         https://bugs.webkit.org/show_bug.cgi?id=57919
2840
2841         Test: media/video-set-rate-from-pause.html
2842
2843         The base class of MediaPlayerPrivateAVFoundation does not actually change the rate
2844         of the media; instead a subclass must do that work.  So when setRate() is called, 
2845         inform a subclass through a new pure virtual updateRate() function that there's 
2846         work to be done.
2847
2848         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2849         (WebCore::MediaPlayerPrivateAVFoundation::setRate): Call updateRate()
2850         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2851         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
2852         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2853         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate): Added.  Set the requested rate.
2854
2855 2011-04-06  Dai Mikurube  <dmikurube@chromium.org>
2856
2857         Reviewed by David Levin.
2858
2859         Add QUOTA build flag for unified quota API
2860         https://bugs.webkit.org/show_bug.cgi?id=57918
2861
2862         * Configurations/FeatureDefines.xcconfig: Added QUOTA build flag
2863         * GNUmakefile.am: Added QUOTA build flag
2864         * WebCore.pri: Added QUOTA build flag
2865
2866 2011-04-06  Stephanie Lewis  <slewis@apple.com>
2867
2868         Reviewed by Darin Adler.
2869
2870         https://bugs.webkit.org/show_bug.cgi?id=57997
2871         <rdar://problem/9187856> REGRESSION(r75555): ~5-7 MB increase in memory between iBench runs
2872         Navigating away from a Scrolled page which queues a scroll event that is never dispatched.
2873         Cancel all enqueued events when detaching the Document the events cannot keep the Document
2874         alive.
2875
2876         No change in functionality so no new tests.  
2877
2878         * dom/Document.cpp:
2879         (WebCore::Document::detach):
2880         * dom/EventQueue.cpp:
2881         (WebCore::EventQueue::cancelQueuedEvents):
2882         * dom/EventQueue.h:
2883
2884 2011-04-06  Dan Bernstein  <mitz@apple.com>
2885
2886         Reviewed by Darin Adler.
2887
2888         <rdar://problem/9084761> REGRESSION (r73993): Default Arabic line spacing has gotten very loose when the specified font is not Arabic
2889         https://bugs.webkit.org/show_bug.cgi?id=58002
2890
2891         * platform/graphics/mac/SimpleFontDataMac.mm:
2892         (WebCore::SimpleFontData::platformInit): The version of Geeza Pro in Snow Leopard
2893         does not require the vertical metrics tweaks that were needed in Leopard. That the
2894         tweaks were being applied went mostly unnoticed until r73993, because until then it
2895         only affected cases where Geeza Pro was specified, not when it occurred as a fallback
2896         font.
2897
2898 2011-04-06  Roland Steiner  <rolandsteiner@chromium.org>
2899
2900         Reviewed by Dimitri Glazkov.
2901
2902         Bug 57994 - Move guardRef functionality back to Document
2903         https://bugs.webkit.org/show_bug.cgi?id=57994
2904
2905         Move the relevant code parts from TreeScope back into Document.
2906
2907         No new tests. (no new functionality)
2908
2909         * dom/Document.cpp:
2910         (WebCore::Document::removedLastRef):
2911         * dom/Document.h:
2912         * dom/TreeScope.cpp:
2913         (WebCore::TreeScope::destroyTreeScopeData):
2914         * dom/TreeScope.h:
2915
2916 2011-04-06  Ian Henderson  <ianh@apple.com>
2917
2918         Reviewed by Simon Fraser, Antti Koivisto.
2919
2920         Fast path for parsing simple CSS values
2921         https://bugs.webkit.org/show_bug.cgi?id=57964
2922
2923         Add functions to parse simple color or dimension values, skipping the
2924         overhead of full CSS parsing.
2925
2926         Change parseValue to a static method to avoid unnecessary allocation
2927         of a CSSParser in the fast case.
2928
2929         * css/CSSMutableStyleDeclaration.cpp:
2930         (WebCore::CSSMutableStyleDeclaration::setProperty):
2931         Changed to use the new, static parseValue method.
2932         * css/CSSParser.cpp:
2933         (WebCore::isColorPropertyID):
2934         (WebCore::parseColorValue):
2935         Parses any color accepted by the existing parseColor() static method.
2936         We must handle color identifiers separately, since parseColor() will
2937         change 'red' into 'rgb(255, 0, 0)'.
2938         (WebCore::isSimpleLengthPropertyID):
2939         (WebCore::parseSimpleLengthValue):
2940         Parses a value of the form 'NNpx', 'NN%', or 'NN' (when strict is
2941         false, or 'NN' is '0').  Returns false to fall back to the slow path.
2942         (WebCore::CSSParser::parseValue):
2943         * css/CSSParser.h:
2944         * css/WebKitCSSMatrix.cpp:
2945         (WebCore::WebKitCSSMatrix::setMatrixValue):
2946         Changed to use the new, static parseValue method.
2947
2948 2011-04-06  Kevin Ollivier  <kevino@theolliviers.com>
2949
2950         Reviewed by Darin Adler.
2951
2952         Make sure JS_EXPORT_PRIVATE is an empty define when we aren't using the export macros.
2953
2954         https://bugs.webkit.org/show_bug.cgi?id=27551
2955
2956         * config.h:
2957
2958 2011-04-06  Simon Fraser  <simon.fraser@apple.com>
2959
2960         Reviewed by Antti Koivisto.
2961
2962         Some minor style resolution optimizations
2963         https://bugs.webkit.org/show_bug.cgi?id=57996
2964
2965         A couple of minor optimizations to style-related code.
2966
2967         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2968         (WebCore::isCSSPropertyName):
2969         (WebCore::JSCSSStyleDeclaration::putDelegate):
2970         Avoid calling cssPropertyName() twice when setting style on an element.
2971         
2972         * css/CSSStyleSelector.cpp:
2973         (WebCore::useSVGZoomRules):
2974         (WebCore::CSSStyleSelector::applyProperty):
2975         Avoid calling isSVGElement() for every property, since only a two properties
2976         care about it.
2977
2978 2011-04-06  Ian Henderson  <ianh@apple.com>
2979
2980         Reviewed by Antti Koivisto.
2981
2982         Unnecessary string allocation in CSSStyleDeclaration::setProperty
2983         https://bugs.webkit.org/show_bug.cgi?id=57995
2984
2985         Pass the bool representing the property's importance directly instead
2986         of constructing a string.
2987
2988         * css/CSSStyleDeclaration.cpp:
2989         (WebCore::CSSStyleDeclaration::setProperty):
2990
2991 2011-04-06  Leandro Gracia Gil  <leandrogracia@chromium.org>
2992
2993         Reviewed by Steve Block.
2994
2995         Make the style of createFunctionOnlyCallback in V8 consistent with the JavaScriptCore version.
2996         https://bugs.webkit.org/show_bug.cgi?id=57963
2997
2998         No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
2999
3000         * bindings/v8/V8Utilities.h:
3001         (WebCore::createFunctionOnlyCallback):
3002         * bindings/v8/custom/V8GeolocationCustom.cpp:
3003         (WebCore::V8Geolocation::getCurrentPositionCallback):
3004         (WebCore::V8Geolocation::watchPositionCallback):
3005
3006 2011-04-06  Brian Weinstein  <bweinstein@apple.com>
3007
3008         Reviewed by Adam Roben.
3009
3010         WebKit2: Support Windows 7 Gestures
3011         https://bugs.webkit.org/show_bug.cgi?id=49824
3012         <rdar://problem/8689728>
3013         
3014         Move WindowTouch.h from WebKit/win, so it can be used in both WebKit and WebKit2.
3015
3016         * WebCore.vcproj/WebCore.vcproj:
3017         * platform/win/WindowsTouch.h: Copied from WebKit/win/WindowsTouch.h.
3018
3019 2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
3020
3021         Reviewed by Andreas Kling.
3022
3023         [Qt] We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
3024         https://bugs.webkit.org/show_bug.cgi?id=57974
3025
3026         We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
3027
3028         No new tests needed, just a config flag rename.
3029
3030         * features.pri:
3031
3032 2011-04-06  Tyler Close  <tjclose@chromium.org>
3033
3034         Reviewed by Nate Chapin.
3035
3036         run-bindings-tests reference files out of sync with CodeGenerator*.pm
3037         https://bugs.webkit.org/show_bug.cgi?id=57967
3038
3039         * bindings/scripts/test/V8/V8TestCallback.cpp:
3040
3041 2011-04-06  Asanka Herath  <asanka@chromium.org>
3042
3043         Reviewed by Darin Fisher.
3044
3045         Add new TargetType: TargetIsFavicon
3046
3047         https://bugs.webkit.org/show_bug.cgi?id=57659
3048
3049         No new functionality added, so no additional tests.
3050
3051         * platform/network/ResourceRequestBase.h:
3052
3053 2011-04-06  David Hyatt  <hyatt@apple.com>
3054
3055         Reviewed by Simon Fraser.
3056
3057         https://bugs.webkit.org/show_bug.cgi?id=57981
3058         
3059         Update the column count and width computation algorithm for CSS3 multi-column layout 
3060         to match the revised pseudo-algorithm in the latest draft of the spec.
3061
3062         * rendering/RenderBlock.cpp:
3063         (WebCore::RenderBlock::calcColumnWidth):
3064
3065 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
3066
3067         Reviewed by Eric Seidel.
3068
3069         borderPaddingMarginStart and borderPaddingMarginEnd should take RenderInline
3070         https://bugs.webkit.org/show_bug.cgi?id=57965
3071
3072         Changed the argument types of borderPaddingMarginStart and borderPaddingMarginEnd
3073         from RenderBoxModelObject to RenderInline since they call marginStart and marginEnd
3074         instead of marginStartForChild and marginEndForChild respectively.
3075
3076         Calling these two functions on RenderInline is okay because writing-mode cannot differ
3077         from that of the containing block.
3078
3079         * rendering/RenderBlockLineLayout.cpp:
3080         (WebCore::borderPaddingMarginStart):
3081         (WebCore::borderPaddingMarginEnd):
3082         (WebCore::inlineLogicalWidth):
3083
3084 2011-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
3085
3086         Unreviewed, rolling out r83039.
3087         http://trac.webkit.org/changeset/83039
3088         https://bugs.webkit.org/show_bug.cgi?id=57978
3089
3090         introduced a new regression in conjunction to
3091         ReplaceSelectionCommand (Requested by rniwa on #webkit).
3092
3093         * editing/EditingStyle.cpp:
3094         (WebCore::EditingStyle::init):
3095         * editing/InsertParagraphSeparatorCommand.cpp:
3096         (WebCore::InsertParagraphSeparatorCommand::doApply):
3097
3098 2011-04-06  Naoki Takano  <takano.naoki@gmail.com>
3099
3100         Reviewed by David Levin.
3101
3102         Webkit ignores PgUp/PgDown/Home/End in SELECT tag objects
3103         https://bugs.webkit.org/show_bug.cgi?id=27658
3104
3105         Test: fast/events/select-element.html
3106
3107         * dom/SelectElement.cpp:
3108         (WebCore::nextValidIndex): Moved from elsewhere in the file to be used by other routines.
3109         (WebCore::nextSelectableListIndexPageAway): Returns a selectable index one page away from the given index.
3110         (WebCore::nextSelectableListIndex): Implemented with nextValidIndex.
3111         And converted to a normal static function from a private function of SelectElement.
3112         (WebCore::previousSelectableListIndex): Implemented with nextValidIndex.
3113         And converted to a normal static function from a private function of SelectElement.
3114         (WebCore::firstSelectableListIndex): Returns the first selectable index.
3115         (WebCore::lastSelectableListIndex): Returns the last selectable index.
3116         (WebCore::SelectElement::menuListDefaultEventHandler): Converted from C cast to C++ cast.
3117         (WebCore::SelectElement::listBoxDefaultEventHandler): Adds support for PageUp/PageDown/Home/End with both single and multiple selection.
3118
3119         * dom/SelectElement.h:
3120         (WebCore::SelectElement::): Remove nextSelectableListIndex() and previousSelectableListIndex().
3121
3122         * rendering/RenderListBox.h: Makes RenderListBox::size public so that PageUp/PageDown behavior can use the actual list size rather than that specified in HTML.
3123         They can differ due to the minimum size imposed by RenderListBox.
3124
3125 2011-04-06  David Hyatt  <hyatt@apple.com>
3126
3127         Reviewed by Dan Bernstein.
3128
3129         https://bugs.webkit.org/show_bug.cgi?id=57975
3130
3131         The "More..." link for line clamping no longer shows up in Safari RSS. Fix the isLink() check
3132         to just look at the style, so that it can find the InlineTextBox and not care that it's a child
3133         of the link element and not the line box for the link element itself (since that line box got
3134         culled).
3135
3136         * rendering/RenderFlexibleBox.cpp:
3137         (WebCore::RenderFlexibleBox::applyLineClamp):
3138
3139 2011-04-06  Brady Eidson  <beidson@apple.com>
3140
3141         Reviewed by Anders Carlsson.
3142
3143         https://bugs.webkit.org/show_bug.cgi?id=57973 and https://bugs.webkit.org/show_bug.cgi?id=57973
3144         WK2 icon database should be able to get a CGImage of a specific size
3145
3146         * platform/graphics/BitmapImage.h:
3147         * platform/graphics/Image.h:
3148         (WebCore::Image::getFirstCGImageRefOfSize):
3149         
3150         * platform/graphics/cg/ImageCG.cpp:
3151         (WebCore::BitmapImage::getFirstCGImageRefOfSize): Walk the frames of the image until reaching the
3152           first frame of the requested size.
3153
3154 2011-04-06  Malcolm MacLeod  <malcolm.macleod@tshwanedje.com>
3155
3156         Reviewed by Kevin Ollivier.
3157
3158         [wx] Fix cursor handling so that we always call the chrome to set it.
3159         
3160         https://bugs.webkit.org/show_bug.cgi?id=57972
3161
3162         * platform/wx/WidgetWx.cpp:
3163         (WebCore::Widget::setCursor):
3164
3165 2011-04-06  David Hyatt  <hyatt@apple.com>
3166
3167         Reviewed by Dan Bernstein.
3168
3169         https://bugs.webkit.org/show_bug.cgi?id=41445
3170         
3171         Visited links painting with black background. Make sure that if the visited style has
3172         the initial background color (transparent) set that we just use the unvisited color.
3173
3174         Added fast/history/visited-link-background-color.html
3175
3176         * rendering/style/RenderStyle.cpp:
3177         (WebCore::RenderStyle::visitedDependentColor):
3178
3179 2011-04-06  Csaba Osztrogon√°c  <ossy@webkit.org>
3180
3181         Unreviewed Qt buildfix after r83079.
3182
3183         * WebCore.pro:
3184
3185 2011-04-06  Dean Jackson  <dino@apple.com>
3186
3187         Reviewed by Chris Marrin.
3188
3189         https://bugs.webkit.org/show_bug.cgi?id=56936
3190         Crash in ImplicitAnimation::~ImplicitAnimation
3191
3192         Make sure the style and start time waiting lists
3193         are cleared in the CompositeAnimation destructor. This
3194         way, no running transitions can be left in a state
3195         where they are destroyed as the AnimationControllerPrivate
3196         cleans up.
3197
3198         * page/animation/CompositeAnimation.cpp:
3199         (WebCore::CompositeAnimation::~CompositeAnimation):
3200
3201 2011-04-06  Robert Sesek  <rsesek@chromium.org>
3202
3203         Reviewed by Alexey Proskuryakov.
3204
3205         Move code duplicated between the WebKit/mac and WebKit2 down to WebCore because Chromium will need it too
3206         https://bugs.webkit.org/show_bug.cgi?id=54969
3207
3208         No change in behavior; no new tests.
3209
3210         * editing/TextIterator.cpp:
3211         (WebCore::TextIterator::locationAndLengthFromRange): New method from duplicated code in WebKits
3212         * editing/TextIterator.h:
3213         * page/Frame.cpp:
3214         (WebCore::Frame::rangeForPoint): New method from duplicated code in WebKits
3215
3216 2011-04-06  Leandro Gracia Gil  <leandrogracia@chromium.org>
3217
3218         Reviewed by Steve Block.
3219
3220         Factoring the creation of 'FunctionOnly' callbacks in JavaScriptCore.
3221         https://bugs.webkit.org/show_bug.cgi?id=57770
3222
3223         Create a template from an existing functionality in JSGeolocationCustom.cpp
3224         to be used by the custom bindings of both Geolocation and the Media Stream API.
3225         V8 version of this bug: https://bugs.webkit.org/show_bug.cgi?id=57760
3226
3227         No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
3228
3229         * Android.jscbindings.mk:
3230         * CMakeLists.txt:
3231         * GNUmakefile.am:
3232         * WebCore.gypi:
3233         * WebCore.pro:
3234         * WebCore.vcproj/WebCore.vcproj:
3235         * WebCore.xcodeproj/project.pbxproj:
3236         * bindings/js/CallbackFunction.cpp: Added.
3237         (WebCore::checkFunctionOnlyCallback):
3238         * bindings/js/CallbackFunction.h: Added.
3239         (WebCore::createFunctionOnlyCallback):
3240         * bindings/js/JSBindingsAllInOne.cpp:
3241         * bindings/js/JSGeolocationCustom.cpp:
3242         (WebCore::JSGeolocation::getCurrentPosition):
3243         (WebCore::JSGeolocation::watchPosition):
3244
3245 2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
3246
3247         Reviewed by Andreas Kling.
3248
3249         [Qt] Implement fullscreen playback for the GStreamer backend.
3250         https://bugs.webkit.org/show_bug.cgi?id=56826
3251
3252         Implement support for fullscreen playback when building the
3253         Qt port with the GStreamer backend (DEFINES+=USE_GSTREAMER=1).
3254         The implementation is done in FullScreenVideoQt alongside with
3255         the Qt Multimedia support.
3256
3257         No new tests because layout tests cover it. They are not yet activated
3258         but will be any time soon.
3259
3260         * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h:
3261         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
3262         (FullScreenVideoWindow::FullScreenVideoWindow):
3263         (FullScreenVideoWindow::setVideoElement):
3264         (FullScreenVideoWindow::closeEvent):
3265         (FullScreenVideoWindow::keyPressEvent):
3266         (FullScreenVideoWindow::event):
3267         (FullScreenVideoWindow::showFullScreen):
3268         (FullScreenVideoWindow::hideCursor):
3269         (FullScreenVideoWindow::showCursor):
3270
3271 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
3272
3273         Reviewed by Dimitri Glazkov.
3274
3275         Bundle lineLeftOffset and lineRightOffset as a class
3276         https://bugs.webkit.org/show_bug.cgi?id=57851
3277
3278         Added a new class LineOffsets that encapsulates lineLeftOffset and lineRightOffset.
3279         The patch makes clear that lineLeftOffset and lineRightOffset are never read individually
3280         and only the difference is used to compute the width.
3281
3282         * rendering/RenderBlock.h:
3283         * rendering/RenderBlockLineLayout.cpp:
3284         (WebCore::RenderBlock::skipLeadingWhitespace): Takes LineOffsets instead of two integers.
3285         (WebCore::LineOffsets::LineOffsets): Added.
3286         (WebCore::LineOffsets::width): Added.
3287         (WebCore::LineOffsets::setLeft): Added.
3288         (WebCore::LineOffsets::setRight): Added.
3289         (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
3290         (WebCore::RenderBlock::positionNewFloatOnLine): Takes LineOffsets instead of two integers.
3291
3292 2011-04-06  David Hyatt  <hyatt@apple.com>
3293
3294         Reviewed by Dan Bernstein.
3295
3296         https://bugs.webkit.org/show_bug.cgi?id=57916
3297         
3298         Implement an optimization to the line box tree to cull out most of the intermediate
3299         line boxes that can occur between the root line box and the leaves of the tree (images
3300         and text).
3301
3302         RenderInlines now have a boolean member, m_alwaysCreateLineBoxes,
3303         that starts off as false. Only if it gets flipped to true will there be any line boxes
3304         created for that RenderInline.
3305         
3306         * page/FocusController.cpp:
3307         (WebCore::FocusController::advanceFocusDirectionally):
3308         Adjust the ordering of updateLayout calls to make sure rects aren't queried unless layout
3309         is up to date.
3310
3311         * page/SpatialNavigation.cpp:
3312         (WebCore::hasOffscreenRect):
3313         (WebCore::nodeRectInAbsoluteCoordinates):
3314         Add asserts in spatial navigation code to catch any future bad queries that might be made
3315         for rectangles without layout being up to date.
3316
3317         * platform/graphics/FloatRect.cpp:
3318         (WebCore::FloatRect::uniteIfNonZero):
3319         * platform/graphics/FloatRect.h:
3320         * platform/graphics/IntRect.cpp:
3321         (WebCore::IntRect::uniteIfNonZero):
3322         * platform/graphics/IntRect.h:
3323         Add a new unite function that is useful for the render tree to FloatRect and IntRect.  This
3324         version allows rect unites to happen if either width or height is nonzero.
3325
3326         * rendering/HitTestResult.cpp:
3327         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
3328         Make sure rect-based hit testing properly adds in culled inline ancestors to the set of nodes
3329         if content inside those inlines is hit.
3330
3331         * rendering/InlineBox.h:
3332         (WebCore::InlineBox::logicalFrameRect):
3333         Fix a bug in this function for obtaining the logical frame rect of an inline box.
3334
3335         * rendering/InlineFlowBox.cpp:
3336         (WebCore::InlineFlowBox::addToLine):
3337         addToLine now also checks line gap in the line box tree optimization checks.
3338     
3339         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
3340         (WebCore::InlineFlowBox::computeOverflow):
3341         * rendering/InlineFlowBox.h:
3342         Rewritten to add the text box overflow to the text box itself.
3343
3344          * rendering/InlineTextBox.cpp:
3345         (WebCore::InlineTextBox::destroy):
3346         Destroy has been changed to call a helper function to remove and destroy the line boxes that
3347         is now called from one additional spot.
3348
3349         (WebCore::InlineTextBox::logicalOverflowRect):
3350         (WebCore::InlineTextBox::setLogicalOverflowRect):
3351         Text boxes now cache their own overflow in a global hash table.
3352
3353         (WebCore::InlineTextBox::baselinePosition):
3354         (WebCore::InlineTextBox::lineHeight):
3355         Changed to not assume that the parent line box's renderer is the RenderText's immediate
3356         parent, since intermediate line boxes may have been culled.
3357
3358         (WebCore::InlineTextBox::paint):
3359         Paint now properly checks only the text box overflow instead of the parent line box's overflow.
3360
3361         * rendering/InlineTextBox.h:
3362         (WebCore::InlineTextBox::logicalTopVisualOverflow):
3363         (WebCore::InlineTextBox::logicalBottomVisualOverflow):
3364         (WebCore::InlineTextBox::logicalLeftVisualOverflow):
3365         (WebCore::InlineTextBox::logicalRightVisualOverflow):
3366         New accessors to obtain overflow for inline text boxes.
3367
3368         * rendering/RenderBlock.cpp:
3369         (WebCore::RenderBlock::updateFirstLetter):
3370         updateFirstLetter now removes text boxes from the line box tree before it destroys them, since those
3371         text boxes may not have anything in between them and the block that contains the inline first letter
3372         container.
3373
3374         * rendering/RenderBlockLineLayout.cpp:
3375         (WebCore::RenderBlock::createLineBoxes):
3376         The culling optimization is done here.  Only if the RenderInline says that boxes are allowed will they
3377         be created.
3378
3379         (WebCore::RenderBlock::layoutInlineChildren):
3380         The state of the RenderInline is updated here, in case it is discovered that line boxes are now needed.
3381         This is done before any lines are built.
3382
3383         * rendering/RenderInline.cpp:
3384         (WebCore::RenderInline::RenderInline):
3385         The new m_alwaysCreateLineBoxes flag has been added to the constructor.
3386
3387         (WebCore::RenderInline::styleDidChange):
3388         An initial update of the m_alwaysCreateLineBoxes happens here for things that can be checked immediately
3389         (like having a layer, borders, padding, margins or backgrounds).  Some checks that depend on examining
3390         the RenderInline's parent (including first line styles) happen later in layoutInlineChildren.
3391
3392         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
3393         The function called by layoutInlineChildren to check parent and child style differences (e.g., font,
3394         vertical alignment, line height, etc.).
3395
3396         (WebCore::RenderInline::absoluteRects):
3397         (WebCore::RenderInline::culledInlineAbsoluteRects):
3398         absoluteRects calls culledInlineAbsoluteRects when m_alwaysCreateLineBoxes is false.
3399
3400         (WebCore::RenderInline::absoluteQuads):
3401         (WebCore::RenderInline::culledInlineAbsoluteQuads):
3402         absoluteQuads calls culledInlineAbsoluteQuads when m_alwaysCreateLineBoxes is false.
3403
3404         (WebCore::RenderInline::offsetLeft):
3405         (WebCore::RenderInline::offsetTop):
3406         offsetLeft and offsetTop now check descendant renderers when m_alwaysCreateLineBoxes is false.
3407
3408         (WebCore::RenderInline::linesBoundingBox):
3409         (WebCore::RenderInline::culledInlineBoundingBox):
3410         lineBoundingBox calls culledInlineBoundingBox when m_alwaysCreateLineBoxes is false.
3411
3412         (WebCore::RenderInline::culledInlineFirstLineBox):
3413         (WebCore::RenderInline::culledInlineLastLineBox):
3414         Helpers that return the first and last line box descendants. Used by firstLineBoxIncludingCulling and
3415         lastLineBoxIncludingCulling (which are in turn called by offsetLeft and offsetTop).
3416
3417         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
3418         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
3419         linesVisualOverflowBoundingBox calls culledInlineVisualOverflowBoundingBox when m_alwaysCreateLineBoxes is false.
3420
3421         (WebCore::RenderInline::clippedOverflowRectForRepaint):
3422         The initial bailout check is now done using firstLineBoxIncludingCulling instead of just firstLineBox.
3423
3424         (WebCore::RenderInline::dirtyLineBoxes):
3425         dirtyLineBoxes now crawls into descendants to figure out which root lines to dirty when
3426         m_alwaysCreateLineBoxes is false.
3427
3428         (WebCore::RenderInline::createAndAppendInlineFlowBox):
3429         Clear the m_alwaysCreateLineBoxes if a box gets added anyway. This happens for leaf inline flows and also
3430         when line-box-contain is set to an unusual value.
3431
3432         (WebCore::RenderInline::addFocusRingRects):
3433         Used culledInlineAbsoluteRects in place of the line box walk when m_alwaysCreateLineBoxes is false.
3434
3435         * rendering/RenderInline.h:
3436         (WebCore::RenderInline::firstLineBoxIncludingCulling):
3437         (WebCore::RenderInline::lastLineBoxIncludingCulling):
3438         Helpers used in a few places (like offsetLeft and offsetTop), mostly in places where the existence of a box
3439         is all that needs checking.
3440
3441         (WebCore::RenderInline::alwaysCreateLineBoxes):
3442         (WebCore::RenderInline::setAlwaysCreateLineBoxes):
3443         Functions for getting and setting the m_alwaysCreateLineBoxes flag.
3444
3445         * rendering/RenderLineBoxList.cpp:
3446         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
3447         Modified to use firstLineBoxIncludingCulling and lastLineBoxIncludingCulling to ensure the right set of
3448         lines get dirtied.
3449
3450         * rendering/RenderText.cpp:
3451         (WebCore::RenderText::removeAndDestroyTextBoxes):
3452         New helper invoked by destroy and also from updateFirstLetter.
3453
3454         (WebCore::RenderText::destroy):
3455         Changed to call removeAndDestroyTextBoxes.
3456
3457         (WebCore::RenderText::absoluteRects):
3458         Fixed to be properly physical instead of logical.
3459
3460         (WebCore::RenderText::linesVisualOverflowBoundingBox):
3461         New implementation for RenderText that gives the bounding box of the text boxes including overflow from
3462         shadows, glyphs, text-stroke, etc.  Used by RenderInline::culledInlineVisualOverflowBoundingBox.