Use Vector instead of a linked list for rules in CSSStyleSelector
[WebKit.git] / Source / WebCore / ChangeLog
1 2011-02-02  Antti Koivisto  <antti@apple.com>
2
3         Reviewed by Maciej Stachowiak.
4
5         Use Vector instead of a linked list for rules in CSSStyleSelector
6         https://bugs.webkit.org/show_bug.cgi?id=53581
7         
8         - eliminate CSSRuleDataList, replace with Vector<RuleData>
9         - rename CSSRuleData -> RuleData and CSSRuleSet -> RuleSet 
10           (these are selector internal classes, CSS prefix is better reserved for public ones).
11         - constify a bit
12         - shrink the vectors to fit after collecting the rules
13
14         * css/CSSStyleSelector.cpp:
15         (WebCore::RuleData::RuleData):
16         (WebCore::RuleData::position):
17         (WebCore::RuleData::rule):
18         (WebCore::RuleData::selector):
19         (WebCore::RuleSet::disableAutoShrinkToFit):
20         (WebCore::RuleSet::getIDRules):
21         (WebCore::RuleSet::getClassRules):
22         (WebCore::RuleSet::getTagRules):
23         (WebCore::RuleSet::getPseudoRules):
24         (WebCore::RuleSet::getUniversalRules):
25         (WebCore::RuleSet::getPageRules):
26         (WebCore::collectSiblingRulesInDefaultStyle):
27         (WebCore::CSSStyleSelector::CSSStyleSelector):
28         (WebCore::loadFullDefaultStyle):
29         (WebCore::loadSimpleDefaultStyle):
30         (WebCore::loadViewSourceStyle):
31         (WebCore::CSSStyleSelector::matchRules):
32         (WebCore::CSSStyleSelector::matchRulesForList):
33         (WebCore::operator >):
34         (WebCore::operator <=):
35         (WebCore::CSSStyleSelector::sortMatchedRules):
36         (WebCore::CSSStyleSelector::matchUARules):
37         (WebCore::RuleSet::RuleSet):
38         (WebCore::RuleSet::~RuleSet):
39         (WebCore::RuleSet::addToRuleSet):
40         (WebCore::RuleSet::addRule):
41         (WebCore::RuleSet::addPageRule):
42         (WebCore::RuleSet::addRulesFromSheet):
43         (WebCore::RuleSet::addStyleRule):
44         (WebCore::collectIdsAndSiblingRulesFromList):
45         (WebCore::RuleSet::collectIdsAndSiblingRules):
46         (WebCore::shrinkMapVectorsToFit):
47         (WebCore::RuleSet::shrinkToFit):
48         (WebCore::CSSStyleSelector::matchPageRules):
49         (WebCore::CSSStyleSelector::matchPageRulesForList):
50         * css/CSSStyleSelector.h:
51         (WebCore::CSSStyleSelector::addMatchedRule):
52
53 2011-02-02  Andrey Adaikin  <aandrey@google.com>
54
55         Reviewed by Pavel Feldman.
56
57         Web Inspector: Use DIVs instead of TABLE in TextViewer
58         https://bugs.webkit.org/show_bug.cgi?id=53299
59
60         * inspector/front-end/SourceFrame.js:
61         (WebInspector.SourceFrame.prototype._createTextViewer):
62         (WebInspector.SourceFrame.prototype._mouseDown):
63         * inspector/front-end/TextViewer.js:
64         (WebInspector.TextViewer):
65         (WebInspector.TextViewer.prototype.set mimeType):
66         (WebInspector.TextViewer.prototype.revealLine):
67         (WebInspector.TextViewer.prototype.addDecoration):
68         (WebInspector.TextViewer.prototype.removeDecoration):
69         (WebInspector.TextViewer.prototype.markAndRevealRange):
70         (WebInspector.TextViewer.prototype.highlightLine):
71         (WebInspector.TextViewer.prototype.clearLineHighlight):
72         (WebInspector.TextViewer.prototype.freeCachedElements):
73         (WebInspector.TextViewer.prototype._handleKeyDown):
74         (WebInspector.TextViewer.prototype.editLine.finishEditing):
75         (WebInspector.TextViewer.prototype.editLine):
76         (WebInspector.TextViewer.prototype.beginUpdates):
77         (WebInspector.TextViewer.prototype.endUpdates):
78         (WebInspector.TextViewer.prototype.resize):
79         (WebInspector.TextViewer.prototype._textChanged):
80         (WebInspector.TextViewer.prototype._updatePanelOffsets):
81         (WebInspector.TextViewer.prototype._syncScroll):
82         (WebInspector.TextViewer.prototype._syncDecorationsForLine):
83         (WebInspector.TextEditorChunkedPanel):
84         (WebInspector.TextEditorChunkedPanel.prototype.set syncScrollListener):
85         (WebInspector.TextEditorChunkedPanel.prototype.get textModel):
86         (WebInspector.TextEditorChunkedPanel.prototype.addDecoration):
87         (WebInspector.TextEditorChunkedPanel.prototype.removeDecoration):
88         (WebInspector.TextEditorChunkedPanel.prototype.revealLine):
89         (WebInspector.TextEditorChunkedPanel.prototype.makeLineAChunk):
90         (WebInspector.TextEditorChunkedPanel.prototype.textChanged):
91         (WebInspector.TextEditorChunkedPanel.prototype.beginUpdates):
92         (WebInspector.TextEditorChunkedPanel.prototype.endUpdates):
93         (WebInspector.TextEditorChunkedPanel.prototype.resize):
94         (WebInspector.TextEditorChunkedPanel.prototype._scroll):
95         (WebInspector.TextEditorChunkedPanel.prototype._scheduleRepaintAll):
96         (WebInspector.TextEditorChunkedPanel.prototype._buildChunks):
97         (WebInspector.TextEditorChunkedPanel.prototype._repaintAll):
98         (WebInspector.TextEditorChunkedPanel.prototype._chunkNumberForLine):
99         (WebInspector.TextEditorChunkedPanel.prototype._chunkForLine):
100         (WebInspector.TextEditorGutterPanel):
101         (WebInspector.TextEditorGutterPanel.prototype.freeCachedElements):
102         (WebInspector.TextEditorGutterPanel.prototype._createNewChunk):
103         (WebInspector.TextEditorGutterPanel.prototype._expandChunks):
104         (WebInspector.TextEditorGutterChunk):
105         (WebInspector.TextEditorGutterChunk.prototype.get expanded):
106         (WebInspector.TextEditorGutterChunk.prototype.set expanded):
107         (WebInspector.TextEditorGutterChunk.prototype.get height):
108         (WebInspector.TextEditorGutterChunk.prototype._createRow):
109         (WebInspector.TextEditorMainPanel):
110         (WebInspector.TextEditorMainPanel.prototype.set syncDecorationsForLine):
111         (WebInspector.TextEditorMainPanel.prototype.set mimeType):
112         (WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
113         (WebInspector.TextEditorMainPanel.prototype.highlightLine):
114         (WebInspector.TextEditorMainPanel.prototype.clearLineHighlight):
115         (WebInspector.TextEditorMainPanel.prototype.freeCachedElements):
116         (WebInspector.TextEditorMainPanel.prototype._buildChunks):
117         (WebInspector.TextEditorMainPanel.prototype._createNewChunk):
118         (WebInspector.TextEditorMainPanel.prototype._expandChunks):
119         (WebInspector.TextEditorMainPanel.prototype._highlightDataReady):
120         (WebInspector.TextEditorMainPanel.prototype._paintLines):
121         (WebInspector.TextEditorMainPanel.prototype._paintLine):
122         (WebInspector.TextEditorMainPanel.prototype._releaseLinesHighlight):
123         (WebInspector.TextEditorMainPanel.prototype._getSelection):
124         (WebInspector.TextEditorMainPanel.prototype._restoreSelection):
125         (WebInspector.TextEditorMainPanel.prototype._selectionToPosition):
126         (WebInspector.TextEditorMainPanel.prototype._positionToSelection):
127         (WebInspector.TextEditorMainPanel.prototype._appendTextNode):
128         (WebInspector.TextEditorMainPanel.prototype._handleDomUpdates):
129         (WebInspector.TextEditorMainChunk):
130         (WebInspector.TextEditorMainChunk.prototype.addDecoration):
131         (WebInspector.TextEditorMainChunk.prototype.set expanded):
132         (WebInspector.TextEditorMainChunk.prototype.get height):
133         (WebInspector.TextEditorMainChunk.prototype.getExpandedLineRow):
134         (WebInspector.TextEditorMainChunk.prototype._createRow):
135         (WebInspector):
136         * inspector/front-end/textViewer.css:
137         (.text-editor-lines):
138         (.text-editor-contents):
139         (.text-editor-editable):
140         (.webkit-line-decorations):
141         (.webkit-line-number):
142         (.webkit-execution-line.webkit-line-content):
143         (.diff-container .webkit-added-line.webkit-line-content):
144         (.diff-container .webkit-removed-line.webkit-line-content):
145         (.diff-container .webkit-changed-line.webkit-line-content):
146         (.webkit-highlighted-line.webkit-line-content):
147
148 2011-02-02  Hans Wennborg  <hans@chromium.org>
149
150         Reviewed by Jeremy Orlow.
151
152         IndexedDB: Implement support for cursor updates
153         https://bugs.webkit.org/show_bug.cgi?id=53421
154
155         Implement support for cursor updates using the same pattern as cursor
156         deletes: forward the calls to the IDBObjectStoreBackend::put().
157         The put() function's signature needs to be changed to allow for a
158         "cursor update mode". This makes the signature more clear anyway,
159         since it replaces the boolean parameter.
160
161         Test: storage/indexeddb/cursor-update.html
162
163         * storage/IDBCursor.idl:
164         * storage/IDBCursorBackendImpl.cpp:
165         (WebCore::IDBCursorBackendImpl::key):
166         (WebCore::IDBCursorBackendImpl::update):
167         * storage/IDBCursorBackendImpl.h:
168         * storage/IDBObjectStore.cpp:
169         (WebCore::IDBObjectStore::add):
170         (WebCore::IDBObjectStore::put):
171         * storage/IDBObjectStoreBackendImpl.cpp:
172         (WebCore::IDBObjectStoreBackendImpl::put):
173         (WebCore::IDBObjectStoreBackendImpl::putInternal):
174         * storage/IDBObjectStoreBackendImpl.h:
175         * storage/IDBObjectStoreBackendInterface.h:
176
177 2011-02-02  Naoki Takano  <takano.naoki@gmail.com>
178
179         Reviewed by Kent Tamura.
180
181         Fix popup menu RTL bug introduced by Changeset 75982.
182         https://bugs.webkit.org/show_bug.cgi?id=53567
183
184         PopupMenuChromium::layout() calculates X position according to RTL or not. So Change the X position calculation in layoutAndCalculateWidgetRect().
185
186         No new tests. However we can check manually with select_dropdown_box_alignment.html, autofill_alignment.html, select_alignment.html, select_dropdown_box_alignment.html, autofill-popup-width-and-item-direction.html
187
188         * platform/chromium/PopupMenuChromium.cpp:
189         (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Fix calculation of x position, because layout() considers RTL. And change the parameter from both X and Y positions to only Y position.
190         (WebCore::PopupContainer::showPopup): Change the passing parameter.
191         (WebCore::PopupContainer::refresh): Change the passing parameter.
192         * platform/chromium/PopupMenuChromium.h: Change the parameter declaration.
193
194 2011-02-02  Alejandro G. Castro  <alex@igalia.com>
195
196         Reviewed by Martin Robinson.
197
198         [GTK] Fix dist compilation
199         https://bugs.webkit.org/show_bug.cgi?id=53579
200
201         * GNUmakefile.am: Added FontWidthVariant.h to the sources, it was
202         added in r77153.
203
204 2011-02-02  Dai Mikurube  <dmikurube@google.com>
205
206         Reviewed by David Levin.
207
208         Make mime type lookup in File::create(path) thread-safe
209         https://bugs.webkit.org/show_bug.cgi?id=47700
210
211         This patch introduces a new function MIMETypeRegistry::getMIMETypeForExtensionThreadSafe().
212         The function is to be called as a thread-safe version of getMIMETypeForExtension() when
213         both FILE_SYSTEM and WORKERS are enabled.
214
215         No tests for this patch. This patch itself doesn't change the behaviors.
216         For Chromium, it runs in the same way with getMIMETypeForExtensionThreadSafe().
217         For the other platforms, it causes compilation error in case of enabled FILE_SYSTEM and WORKERS.
218         The compilation error would be a signal to implement getMIMETypeForExtensionThreadSafe() in these
219         platforms. Currently it doesn't happen since FILE_SYSTEM is not available in the other platforms.
220
221         * platform/MIMETypeRegistry.cpp: Defined generic getMIMETypeForExtension() calling getMIMETypeForExtensionThreadSafe() for enabled FILE_SYSTEM and WORKERS.
222         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
223         * platform/MIMETypeRegistry.h: Declared getMIMETypeForExtensionThreadSafe() which should be implemented for each platform.
224         * platform/android/TemporaryLinkStubs.cpp:
225         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
226         * platform/brew/MIMETypeRegistryBrew.cpp:
227         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
228         * platform/chromium/MIMETypeRegistryChromium.cpp: Defined getMIMETypeForExtensionThreadSafe() for the case when FILE_SYSTEM and WORKERS are enabled.
229         (WebCore::MIMETypeRegistry::getMIMETypeForExtensionThreadSafe):
230         * platform/efl/MIMETypeRegistryEfl.cpp:
231         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
232         * platform/gtk/MIMETypeRegistryGtk.cpp:
233         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
234         * platform/haiku/MIMETypeRegistryHaiku.cpp:
235         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
236         * platform/mac/MIMETypeRegistryMac.mm:
237         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
238         * platform/qt/MIMETypeRegistryQt.cpp:
239         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
240         * platform/win/MIMETypeRegistryWin.cpp:
241         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
242         * platform/wince/MIMETypeRegistryWinCE.cpp:
243         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
244         * platform/wx/MimeTypeRegistryWx.cpp:
245         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
246
247 2011-02-01  Adam Barth  <abarth@webkit.org>
248
249         Reviewed by Alexey Proskuryakov.
250
251         Improve readability of updateWidget by converting bool parameter to an enum
252         https://bugs.webkit.org/show_bug.cgi?id=53576
253
254         As requested on webkit-dev.
255
256         * html/HTMLEmbedElement.cpp:
257         (WebCore::HTMLEmbedElement::updateWidget):
258         * html/HTMLEmbedElement.h:
259         * html/HTMLMediaElement.cpp:
260         (WebCore::HTMLMediaElement::updateWidget):
261         * html/HTMLMediaElement.h:
262         * html/HTMLObjectElement.cpp:
263         (WebCore::HTMLObjectElement::updateWidget):
264         * html/HTMLObjectElement.h:
265         * html/HTMLPlugInImageElement.cpp:
266         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
267         * html/HTMLPlugInImageElement.h:
268         * page/FrameView.cpp:
269         (WebCore::FrameView::updateWidget):
270
271 2011-02-01  James Robinson  <jamesr@chromium.org>
272
273         Reviewed by Adam Barth.
274
275         [v8] Increase V8 native->js recursion limit to match document.write() recursion limit
276         https://bugs.webkit.org/show_bug.cgi?id=53566
277
278         A recursion limit of 22 is necessary to pass fast/dom/Document/document-write-recursion.html.
279         Other than being large enough for this one test case, this limit is arbitrary.
280
281         * bindings/v8/V8Proxy.h:
282
283 2011-02-01  Adam Barth  <abarth@webkit.org>
284
285         Reviewed by Andreas Kling.
286
287         Remove useless comment
288         https://bugs.webkit.org/show_bug.cgi?id=53549
289
290         The reason for this parameter is captured in
291         plugins/netscape-plugin-setwindow-size.html, which is a better place to
292         capture it than in this comment (which otherwise just re-iterates the
293         name of the parameter).
294
295         * html/HTMLPlugInImageElement.cpp:
296         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
297
298 2011-02-01  James Simonsen  <simonjam@chromium.org>
299
300         Reviewed by Tony Gentilcore.
301
302         [WebTiming] Remove asserts that verify timestamp order
303         https://bugs.webkit.org/show_bug.cgi?id=53548
304
305         Covered by existing tests.
306
307         * loader/FrameLoader.cpp:
308         (WebCore::FrameLoader::stopLoading): Remove assert.
309         * page/DOMWindow.cpp:
310         (WebCore::DOMWindow::dispatchTimedEvent): Ditto.
311
312 2011-02-01  Dimitri Glazkov  <dglazkov@chromium.org>
313
314         Add the 'default_targets' enclosure to the flags.
315
316         * WebCore.gyp/WebCore.gyp: Did it.
317
318 2011-02-01  Mihai Parparita  <mihaip@chromium.org>
319
320         Reviewed by James Robinson.
321
322         Async event handlers should not fire within a modal dialog
323         https://bugs.webkit.org/show_bug.cgi?id=53202
324
325         Asychronous events that use EventQueue would currently fire while a
326         modal dialog (e.g. window.alert()) was up. Change EventQueue to use a
327         SuspendableTimer (which automatically gets suspended while dialogs are
328         up and in other cases where JS execution is not allowed).
329         
330         Test: fast/events/scroll-event-during-modal-dialog.html
331
332         * dom/Document.cpp:
333         (WebCore::Document::Document):
334         * dom/EventQueue.cpp:
335         (WebCore::EventQueueTimer::EventQueueTimer):
336         (WebCore::EventQueueTimer::fired):
337         (WebCore::EventQueue::EventQueue):
338         (WebCore::EventQueue::enqueueEvent):
339         (WebCore::EventQueue::pendingEventTimerFired):
340         * dom/EventQueue.h:
341         (WebCore::EventQueue::create):
342         * page/SuspendableTimer.cpp:
343         (WebCore::SuspendableTimer::SuspendableTimer):
344         (WebCore::SuspendableTimer::suspend):
345         (WebCore::SuspendableTimer::resume):
346         * page/SuspendableTimer.h:
347
348 2011-02-01  Patrick Gansterer  <paroga@webkit.org>
349
350         Reviewed by Andreas Kling.
351
352         Change wrong PLATFORM(WIN) to USE(WININET)
353         https://bugs.webkit.org/show_bug.cgi?id=53547
354
355         * platform/network/ResourceHandle.h:
356
357 2011-02-01  Beth Dakin  <bdakin@apple.com>
358
359         32-bit build fix.
360
361         * platform/mac/ScrollAnimatorMac.mm:
362         (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
363
364 2011-01-25  Martin Robinson  <mrobinson@igalia.com>
365
366         Reviewed by Gustavo Noronha Silva.
367
368         [GTK] Two tests crash after r76555
369         https://bugs.webkit.org/show_bug.cgi?id=53057
370
371         Instead of creating synchronous ResourceHandles manually, use the ::create factory.
372         This ensures that ::start() is not called when there is a scheduled failure and also
373         reduces code duplication.
374
375         * platform/network/soup/ResourceHandleSoup.cpp:
376         (WebCore::ResourceHandle::loadResourceSynchronously): Use the ::create factory method.
377
378 2011-02-01  Martin Robinson  <mrobinson@igalia.com>
379
380         Reviewed by Eric Seidel.
381
382         [GTK] GObject DOM bindings do no support the CallWith attribute
383         https://bugs.webkit.org/show_bug.cgi?id=53331
384
385         Disable building GObject DOM bindings for IndexedDB because we do not support
386         the CallWith attribute at this time.
387
388         * bindings/gobject/GNUmakefile.am: Disable building bindings for the IndexedDB API.
389
390 2011-02-01  Darin Adler  <darin@apple.com>
391
392         Reviewed by Brady Eidson.
393
394         Fix a couple loose ends from the back/forward tree encode/decode work
395         https://bugs.webkit.org/show_bug.cgi?id=53537
396
397         * history/HistoryItem.cpp:
398         (WebCore::HistoryItem::encodeBackForwardTreeNode): Remove extra copy of
399         original URL string; no need to encode it twice.
400         (WebCore::HistoryItem::decodeBackForwardTree): Ditto.
401         * history/HistoryItem.h: Removed declaration for function that is no
402         longer defined nor used.
403
404 2011-02-01  Tony Chang  <tony@chromium.org>
405
406         Reviewed by Kent Tamura.
407
408         [chromium] disable arm uninitialized variable warnings
409         https://bugs.webkit.org/show_bug.cgi?id=53553
410
411         We just got another error:
412         third_party/WebKit/Source/WebCore/css/CSSPrimitiveValue.cpp:123:error:
413         'colorTransparent.unstatic.4879' may be used uninitialized in this
414         function
415
416         * WebCore.gyp/WebCore.gyp:
417
418 2011-02-01  chris reiss  <christopher.reiss@nokia.com>
419
420         Reviewed by Adam Barth.
421
422         Self-replicating code makes Safari hang and eventually crash
423         https://bugs.webkit.org/show_bug.cgi?id=15123
424
425        
426         Here we are replicating the Firefox safeguard against
427         recursive document.write( ) 's.
428
429         See  https://bug197052.bugzilla.mozilla.org/attachment.cgi?id=293907 in bug 
430         https://bugzilla.mozilla.org/show_bug.cgi?id=197052 .   Firefox does two things - 
431             a) imposes a recursion limit of 20 on document.write( ) and
432             b) once that limit is passed, panics all the way the call stack (rather than just returning one level.)
433         To see why this is necessary, consider the script : 
434
435         <script>
436            var t = document.body.innerHTML;
437            document.write(t);
438         </script> 
439
440         This will create a tree both broad and deep as the script keeps appending itself to the text.   If
441         we just return one level after the recursion limit is reached, we still allow millions of copies to 
442         duplicate (and execute).   
443
444         The recursion is fortunately depth-first, so as soon as we cross this limit, we panic up the callstack
445         to prevent this situation.    (IE apparently does the same thing, with a lower recursion limit.) 
446
447         Test: fast/dom/Document/document-write-recursion.html        
448         Test: fast/dom/Document/document-close-iframe-load.html
449         Test: fast/dom/Document/document-close-nested-iframe-load.html
450
451
452         * dom/Document.cpp:
453         (WebCore::Document::Document):
454         (WebCore::Document::write):
455         * dom/Document.h:
456
457 2011-02-01  Johnny Ding  <jnd@chromium.org>
458
459         Reviewed by Darin Adler.
460
461         Don't set user gesture in HTMLAnchorElement's click handler because the click handler can be triggered by untrusted event.
462         https://bugs.webkit.org/show_bug.cgi?id=53424
463
464         Test: fast/events/popup-blocked-from-untrusted-click-event-on-anchor.html
465
466         * html/HTMLAnchorElement.cpp:
467         (WebCore::handleLinkClick):
468
469 2011-02-01  Csaba Osztrogonác  <ossy@webkit.org>
470
471         Unreviewed Qt buildfix after r77286.
472
473         https://bugs.webkit.org/show_bug.cgi?id=53520 
474         Remove the physical terminology from IntRect and FloatRect.
475
476         * platform/graphics/TiledBackingStore.cpp:
477         (WebCore::TiledBackingStore::createTiles):
478
479 2011-02-01  Sam Weinig  <sam@webkit.org>
480
481         Fix Mac production builds.
482
483         * DerivedSources.make:
484         * WebCore.xcodeproj/project.pbxproj:
485         * platform/mac/ScrollAnimatorMac.h:
486         * platform/mac/ScrollbarThemeMac.h:
487
488 2011-02-01  Darin Adler  <darin@apple.com>
489
490         Reviewed by Chris Fleizach.
491
492         REGRESSION: Removing focus from area element causes unwanted scrolling
493         https://bugs.webkit.org/show_bug.cgi?id=50169
494
495         Test: fast/images/imagemap-scroll.html
496
497         * html/HTMLAreaElement.cpp:
498         (WebCore::HTMLAreaElement::setFocus): Added override. Calls the new
499         RenderImage::areaElementFocusChanged function.
500         (WebCore::HTMLAreaElement::updateFocusAppearance): Removed the code
501         here that calls setNeedsLayout on the image's renderer. This was an
502         attempt to cause repaint of the renderer, but this function does not
503         need to do that. Also changed this to use the imageElement function
504         to avoid repeating code.
505
506         * html/HTMLAreaElement.h: Updated for above changes.
507
508         * rendering/RenderImage.cpp:
509         (WebCore::RenderImage::paint): Updated for name change.
510         (WebCore::RenderImage::paintAreaElementFocusRing): Renamed this from
511         paintFocusRing, because it only paints area focus rings, and should
512         not be confused with paintFocusRing functions in other classes. Also
513         removed the unused style argument. Removed the code that used an
514         HTMLCollection to see if the focused area element is for this image
515         and instead just call imageElement on the area element.
516         (WebCore::RenderImage::areaElementFocusChanged): Added. Calls repaint.
517
518         * rendering/RenderImage.h: Added a public areaElementFocusChanged
519         function for HTMLAreaElement to call. Made the paintFocusRing function
520         private, renamed it to paintAreaElementFocusRing, and removed its
521         unused style argument.
522
523 2011-02-01  Patrick Gansterer  <paroga@webkit.org>
524
525         Unreviewed WinCE build fix for r77286.
526
527         * platform/graphics/wince/GraphicsContextWinCE.cpp:
528         (WebCore::TransparentLayerDC::TransparentLayerDC):
529
530 2011-02-01  Chris Fleizach  <cfleizach@apple.com>
531
532         Reviewed by Darin Adler.
533
534         AX: AXPosition of AXScrollArea is wrong
535         https://bugs.webkit.org/show_bug.cgi?id=53511
536
537         AccessibilityScrollView needed to return a valid documentFrameView() object.
538         At the same time, the code from document() should be consolidated in 
539         AccessibilityObject, so all objects can use it.
540
541         Test: platform/mac/accessibility/webkit-scrollarea-position.html
542
543         * accessibility/AccessibilityObject.cpp:
544         (WebCore::AccessibilityObject::document):
545         * accessibility/AccessibilityObject.h:
546         * accessibility/AccessibilityScrollView.cpp:
547         (WebCore::AccessibilityScrollView::accessibilityHitTest):
548         (WebCore::AccessibilityScrollView::documentFrameView):
549         * accessibility/AccessibilityScrollView.h:
550
551 2011-02-01  Zhenyao Mo  <zmo@google.com>
552
553         Reviewed by Kenneth Russell.
554
555         getUniform should support SAMPLER_2D or SAMPLER_CUBE
556         https://bugs.webkit.org/show_bug.cgi?id=52190
557
558         * html/canvas/WebGLRenderingContext.cpp:
559         (WebCore::WebGLRenderingContext::getUniform):
560
561 2011-02-01  Zhenyao Mo  <zmo@google.com>
562
563         Reviewed by Darin Adler.
564
565         Fix the incorrect usage of RetainPtr cases in GraphicsContext3DCG.cpp
566         https://bugs.webkit.org/show_bug.cgi?id=53531
567
568         With this fix, running WebGL conformance tests should no longer crash randomly.
569
570         * platform/graphics/cg/GraphicsContext3DCG.cpp:
571         (WebCore::GraphicsContext3D::getImageData):
572
573 2011-02-01  Dimitri Glazkov  <dglazkov@chromium.org>
574
575         One more Chromium build fix after r77286.
576
577         * platform/chromium/ScrollbarThemeChromiumMac.mm:
578         (WebCore::ScrollbarThemeChromiumMac::paint): Changed to not use topLeft().
579
580 2011-02-01  Sam Weinig  <sam@webkit.org>
581
582         Fix the build for Beth.
583
584         * platform/mac/ScrollAnimatorMac.mm:
585         (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
586
587 2011-02-01  Sam Weinig  <sam@webkit.org>
588
589         Reviewed by Beth Dakin.
590
591         Part 2 for <rdar://problem/8492788>
592         Adopt WKScrollbarPainterController
593
594         Use header detection to define scrollbar painting controller #define.
595
596         * WebCore.exp.in:
597         * platform/mac/ScrollAnimatorMac.h:
598         * platform/mac/ScrollbarThemeMac.h:
599         * platform/mac/WebCoreSystemInterface.h:
600         * platform/mac/WebCoreSystemInterface.mm:
601
602 2011-02-01  David Hyatt  <hyatt@apple.com>
603
604         Reviewed by Oliver Hunt.
605
606         https://bugs.webkit.org/show_bug.cgi?id=53520
607         
608         Remove the physical terminology from IntRect and FloatRect.
609         
610         Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes,
611         we need to update our terminology to be more accurate.
612
613         I'm borrowing a page from AppKit here (which also supports flipped NSViews) and
614         renaming right() and bottom() to maxX() and maxY().  These terms remain accurate
615         even for flipped rectangles.
616
617         * accessibility/AccessibilityRenderObject.cpp:
618         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
619         * accessibility/mac/AccessibilityObjectWrapper.mm:
620         (-[AccessibilityObjectWrapper position]):
621         * dom/ClientRect.h:
622         (WebCore::ClientRect::right):
623         (WebCore::ClientRect::bottom):
624         * html/HTMLCanvasElement.cpp:
625         (WebCore::HTMLCanvasElement::convertLogicalToDevice):
626         * html/canvas/CanvasRenderingContext2D.cpp:
627         (WebCore::normalizeRect):
628         * inspector/InspectorAgent.cpp:
629         (WebCore::InspectorAgent::drawElementTitle):
630         * page/DOMWindow.cpp:
631         (WebCore::DOMWindow::adjustWindowRect):
632         * page/DragController.cpp:
633         (WebCore::dragLocForSelectionDrag):
634         * page/EventHandler.cpp:
635         (WebCore::EventHandler::sendContextMenuEventForKey):
636         * page/PrintContext.cpp:
637         (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
638         (WebCore::PrintContext::pageNumberForElement):
639         * page/SpatialNavigation.cpp:
640         (WebCore::end):
641         (WebCore::areRectsFullyAligned):
642         (WebCore::areRectsMoreThanFullScreenApart):
643         (WebCore::below):
644         (WebCore::rightOf):
645         (WebCore::isRectInDirection):
646         (WebCore::entryAndExitPointsForDirection):
647         (WebCore::virtualRectForDirection):
648         * page/WindowFeatures.cpp:
649         (WebCore::WindowFeatures::WindowFeatures):
650         * platform/ScrollView.cpp:
651         (WebCore::ScrollView::wheelEvent):
652         * platform/Scrollbar.cpp:
653         (WebCore::Scrollbar::setFrameRect):
654         * platform/ScrollbarThemeComposite.cpp:
655         (WebCore::ScrollbarThemeComposite::splitTrack):
656         * platform/chromium/ScrollbarThemeChromium.cpp:
657         (WebCore::ScrollbarThemeChromium::paintTickmarks):
658         * platform/graphics/FloatQuad.h:
659         (WebCore::FloatQuad::FloatQuad):
660         * platform/graphics/FloatRect.cpp:
661         (WebCore::FloatRect::intersects):
662         (WebCore::FloatRect::contains):
663         (WebCore::FloatRect::intersect):
664         (WebCore::FloatRect::unite):
665         (WebCore::enclosingIntRect):
666         * platform/graphics/FloatRect.h:
667         (WebCore::FloatRect::maxX):
668         (WebCore::FloatRect::maxY):
669         (WebCore::FloatRect::contains):
670         * platform/graphics/IntRect.cpp:
671         (WebCore::IntRect::intersects):
672         (WebCore::IntRect::contains):
673         (WebCore::IntRect::intersect):
674         (WebCore::IntRect::unite):
675         * platform/graphics/IntRect.h:
676         (WebCore::IntRect::maxX):
677         (WebCore::IntRect::maxY):
678         (WebCore::IntRect::shiftXEdgeTo):
679         (WebCore::IntRect::shiftMaxXEdgeTo):
680         (WebCore::IntRect::shiftYEdgeTo):
681         (WebCore::IntRect::shiftMaxYEdgeTo):
682         (WebCore::IntRect::contains):
683         * platform/graphics/WidthIterator.cpp:
684         (WebCore::WidthIterator::advance):
685         * platform/graphics/cg/GraphicsContextCG.cpp:
686         (WebCore::GraphicsContext::drawRect):
687         (WebCore::GraphicsContext::fillPath):
688         (WebCore::GraphicsContext::fillRect):
689         * platform/graphics/cg/ImageBufferCG.cpp:
690         (WebCore::getImageData):
691         (WebCore::putImageData):
692         * platform/graphics/cg/ImageCG.cpp:
693         (WebCore::BitmapImage::draw):
694         * platform/graphics/filters/FilterEffect.cpp:
695         (WebCore::FilterEffect::copyImageBytes):
696         * platform/graphics/mac/ComplexTextController.cpp:
697         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
698         * platform/graphics/mac/SimpleFontDataMac.mm:
699         (WebCore::SimpleFontData::platformBoundsForGlyph):
700         * platform/graphics/transforms/AffineTransform.cpp:
701         (WebCore::AffineTransform::mapRect):
702         * platform/graphics/win/FontCGWin.cpp:
703         (WebCore::drawGDIGlyphs):
704         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
705         (WebCore::MediaPlayerPrivate::paint):
706         * platform/gtk/RenderThemeGtk.cpp:
707         (WebCore::centerRectVerticallyInParentInputElement):
708         * platform/mac/WidgetMac.mm:
709         (WebCore::Widget::paint):
710         * rendering/InlineFlowBox.cpp:
711         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
712         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
713         * rendering/InlineTextBox.cpp:
714         (WebCore::InlineTextBox::selectionRect):
715         (WebCore::InlineTextBox::paint):
716         (WebCore::InlineTextBox::positionForOffset):
717         * rendering/RenderBlock.cpp:
718         (WebCore::RenderBlock::addOverflowFromChildren):
719         (WebCore::RenderBlock::paintChildren):
720         (WebCore::RenderBlock::paintEllipsisBoxes):
721         (WebCore::RenderBlock::inlineSelectionGaps):
722         (WebCore::RenderBlock::adjustPointToColumnContents):
723         (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
724         (WebCore::RenderBlock::adjustForColumns):
725         * rendering/RenderBlock.h:
726         (WebCore::RenderBlock::FloatingObject::right):
727         (WebCore::RenderBlock::FloatingObject::bottom):
728         * rendering/RenderBox.cpp:
729         (WebCore::RenderBox::reflectedRect):
730         (WebCore::RenderBox::localCaretRect):
731         (WebCore::RenderBox::addShadowOverflow):
732         (WebCore::RenderBox::addLayoutOverflow):
733         (WebCore::RenderBox::visualOverflowRectForPropagation):
734         (WebCore::RenderBox::layoutOverflowRectForPropagation):
735         (WebCore::RenderBox::flipForWritingMode):
736         * rendering/RenderFrameSet.cpp:
737         (WebCore::RenderFrameSet::paintColumnBorder):
738         (WebCore::RenderFrameSet::paintRowBorder):
739         * rendering/RenderInline.cpp:
740         (WebCore::RenderInline::paintOutlineForLine):
741         * rendering/RenderLayer.cpp:
742         (WebCore::RenderLayer::getRectToExpose):
743         (WebCore::cornerRect):
744         (WebCore::RenderLayer::positionOverflowControls):
745         (WebCore::RenderLayer::overflowBottom):
746         (WebCore::RenderLayer::overflowRight):
747         (WebCore::RenderLayer::paintResizer):
748         * rendering/RenderLineBoxList.cpp:
749         (WebCore::RenderLineBoxList::rangeIntersectsRect):
750         (WebCore::RenderLineBoxList::paint):
751         * rendering/RenderListItem.cpp:
752         (WebCore::RenderListItem::positionListMarker):
753         * rendering/RenderListMarker.cpp:
754         (WebCore::RenderListMarker::paint):
755         * rendering/RenderObject.cpp:
756         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
757         * rendering/RenderOverflow.h:
758         (WebCore::RenderOverflow::RenderOverflow):
759         (WebCore::RenderOverflow::addLayoutOverflow):
760         (WebCore::RenderOverflow::addVisualOverflow):
761         (WebCore::RenderOverflow::setLayoutOverflow):
762         (WebCore::RenderOverflow::setVisualOverflow):
763         (WebCore::RenderOverflow::resetLayoutOverflow):
764         * rendering/RenderReplaced.cpp:
765         (WebCore::RenderReplaced::shouldPaint):
766         * rendering/RenderScrollbarTheme.cpp:
767         (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
768         * rendering/RenderTable.cpp:
769         (WebCore::RenderTable::paint):
770         * rendering/RenderTableCell.cpp:
771         (WebCore::RenderTableCell::paint):
772         * rendering/RenderTableSection.cpp:
773         (WebCore::RenderTableSection::paintObject):
774         * rendering/RenderText.cpp:
775         (WebCore::RenderText::absoluteQuads):
776         * rendering/RenderTextControlSingleLine.cpp:
777         (WebCore::RenderTextControlSingleLine::forwardEvent):
778         * rendering/RenderThemeMac.mm:
779         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
780         (WebCore::RenderThemeMac::paintMenuListButton):
781         (WebCore::RenderThemeMac::paintSliderTrack):
782         * rendering/RenderView.cpp:
783         (WebCore::RenderView::computeRectForRepaint):
784         (WebCore::RenderView::docBottom):
785         (WebCore::RenderView::docRight):
786         * rendering/RootInlineBox.cpp:
787         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
788         * rendering/svg/RenderSVGInlineText.cpp:
789         (WebCore::RenderSVGInlineText::localCaretRect):
790
791 2011-02-01  Beth Dakin  <bdakin@apple.com>
792
793         Reviewed by Sam Weinig.
794
795         Fix for <rdar://problem/8492788> Adopt WKScrollbarPainterController
796
797         Lots of new WebCoreSystemInterface functions to export.
798         * WebCore.exp.in:
799         * platform/mac/WebCoreSystemInterface.h:
800         * platform/mac/WebCoreSystemInterface.mm:
801
802         Let the scrollAnimator know when the mouse has
803         moved anywhere inside the page, and when the mouse 
804         has moved in or out of the window. 
805         * page/EventHandler.cpp:
806         (WebCore::EventHandler::mouseMoved):
807         (WebCore::EventHandler::updateMouseEventTargetNode):
808
809         Let the scrollAnimator know when the window has become
810         active or inactive.
811         * page/FocusController.cpp:
812         (WebCore::FocusController::setActive):
813         
814         Let the scrollAnimator know when all of these things
815         are happening.
816         * page/FrameView.cpp:
817         (WebCore::FrameView::setContentsSize):
818         (WebCore::FrameView::didMoveOnscreen):
819         (WebCore::FrameView::willMoveOffscreen):
820         (WebCore::FrameView::currentMousePosition):
821         (WebCore::FrameView::contentsResized):
822         
823         New functions called through WebKit2 that allow the
824         scrollAnimator to know when a live resize starts and ends.
825         (WebCore::FrameView::willStartLiveResize):
826         (WebCore::FrameView::willEndLiveResize):
827         * page/FrameView.h:
828         
829         New functions on ScrollAnimator that pass information
830         to the WKPainterController when we're using one.
831         * platform/ScrollAnimator.h:
832         (WebCore::ScrollAnimator::scrollableArea):
833         (WebCore::ScrollAnimator::contentAreaWillPaint):
834         (WebCore::ScrollAnimator::mouseEnteredContentArea):
835         (WebCore::ScrollAnimator::mouseExitedContentArea):
836         (WebCore::ScrollAnimator::mouseMovedInContentArea):
837         (WebCore::ScrollAnimator::willStartLiveResize):
838         (WebCore::ScrollAnimator::contentsResized):
839         (WebCore::ScrollAnimator::willEndLiveResize):
840         (WebCore::ScrollAnimator::contentAreaDidShow):
841         (WebCore::ScrollAnimator::contentAreaDidHide):
842         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
843         (WebCore::ScrollAnimatorMac::scrollbarPainterDelegate):
844         (WebCore::ScrollAnimatorMac::setPainterForPainterController):
845         (WebCore::ScrollAnimatorMac::removePainterFromPainterController):
846         (WebCore::ScrollAnimatorMac::notityPositionChanged):
847         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
848         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
849         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
850         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
851         (WebCore::ScrollAnimatorMac::willStartLiveResize):
852         (WebCore::ScrollAnimatorMac::contentsResized):
853         (WebCore::ScrollAnimatorMac::willEndLiveResize):
854         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
855         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
856         
857         Let the scrollAnimator know when this is happening.
858         * platform/ScrollView.cpp:
859         (WebCore::ScrollView::paint):
860         
861         New function lets the scrollAnimator get the current 
862         mouse position.
863         * platform/ScrollView.h:
864         (WebCore::ScrollView::currentMousePosition):
865         
866         New function that returns the scrollAnimator when needed.
867         * platform/ScrollableArea.h:
868         (WebCore::ScrollableArea::scrollAnimator):
869         
870         Keep track of if we're in a live resize using a new memeber
871         variable.
872         * platform/mac/ScrollAnimatorMac.h:
873         (WebCore::ScrollAnimatorMac::inLiveResize):
874         * platform/mac/ScrollAnimatorMac.mm:
875         (WebCore::view):
876         
877         New delegates for the WKPainter and WKPainterController
878         (-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]):
879         (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
880         (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
881         (-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]):
882         (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
883         (-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
884         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
885         (-[ScrollKnobAnimation initWithScrollbarPainter:forScrollAnimator:WebCore::animateKnobAlphaTo:duration:]):
886         (-[ScrollKnobAnimation setCurrentProgress:]):
887         (-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]):
888         (-[ScrollbarPainterDelegate convertRectToBacking:]):
889         (-[ScrollbarPainterDelegate convertRectFromBacking:]):
890         (-[ScrollbarPainterDelegate layer]):
891         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:animateKnobAlphaTo:duration:]):
892         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
893         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
894         (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
895
896         Get the WKScrollbarPainterRefs to synch up with the 
897         WKScrollbarPainterControllerRefs when appropriate
898         * platform/mac/ScrollbarThemeMac.h:
899         * platform/mac/ScrollbarThemeMac.mm:
900         (WebCore::ScrollbarThemeMac::registerScrollbar):
901         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
902         (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
903         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
904
905         Implement ScrollableArea's virtual function contentsSize() for access
906         through the scrollAnimator.
907         * rendering/RenderLayer.h:
908         (WebCore::RenderLayer::contentsSize):
909
910 2011-02-01  Carol Szabo  <carol.szabo@nokia.com>
911
912         Reviewed by David Hyatt.
913
914         layoutTestController.counterValueForElementById does not return the correct value
915         https://bugs.webkit.org/show_bug.cgi?id=53037
916
917         Test: fast/css/counters/deep-before.html
918
919         * rendering/RenderTreeAsText.cpp:
920         (WebCore::counterValueForElement):
921         Modified to use the newly available RenderObject::beforePseudoElement()
922         and RenderObject::afterPseudoElement() instead of the old imperfect
923         algorithm to find the before and after pseudo elements.
924
925 2011-02-01  Anton Muhin  <antonm@chromium.org>
926
927         Reviewed by Adam Barth.
928
929         Allow access for security origin same as this.
930         https://bugs.webkit.org/show_bug.cgi?id=53440
931
932         Hard to test as newly added path currently is never hit.
933
934         * page/SecurityOrigin.cpp:
935         (WebCore::SecurityOrigin::canAccess): allow access if this == other
936
937 2011-01-31  Oliver Hunt  <oliver@apple.com>
938
939         Reviewed by Geoffrey Garen.
940
941         Update JSObject storage for new marking API
942         https://bugs.webkit.org/show_bug.cgi?id=53467
943
944         Update WebCore to handle new anonymous slot behaviour.
945
946         * bindings/js/JSDOMWindowShell.cpp:
947         (WebCore::JSDOMWindowShell::setWindow):
948         * bindings/js/WorkerScriptController.cpp:
949         (WebCore::WorkerScriptController::initScript):
950         * bindings/scripts/CodeGeneratorJS.pm:
951
952 2011-02-01  Xiaomei Ji  <xji@chromium.org>
953
954         Reviewed by David Hyatt.
955
956         Fix a text rendering problem when enclosing block is RTL and text runs
957         are in different directionality.
958         https://bugs.webkit.org/show_bug.cgi?id=34176
959
960         The problem happens in the following example scenario (ABC represents 
961         Hebrew characters):
962         <div dir=rtl>this is a <span><span>test <span>ABC</span></span></span></div>
963
964         The line consists of 3 text runs -- TextRun1 TextRun2 TextRun3. In which
965         TextRun1 and TextRun2's bidi level are 2, and TextRun3's bidi level is 1.
966         TextRun2 and TextRun3's least common ancestor is not a sibling of TextRun1.
967
968         The visual bidi run order of the text runs is TextRun3 TextRun1 TextRun2.
969
970         Inside RenderBlock::constructLine(), when RenderBlock::createLineBoxes()
971         creates InlineFlowBox for TextRun2, it should check an InlineFlowBox for
972         the run's render object's ancestor (not only its parent) has already 
973         been constructed or has something following it on the line, in which 
974         case, create a new box for TextRun2 instead of sharing the same box with
975         TextRun3.
976
977         In other words, the following 2 div should render the same results
978         (ABC represents Hebrew characters).
979         <div dir=rtl>this is a <span><span>test <span>ABC</span></span></span></div>
980         <div dir=rtl>this is a <span>Test <span>ABC</span></span></div>
981
982         Test: fast/dom/34176.html
983
984         * rendering/RenderBlockLineLayout.cpp:
985         (WebCore::parentIsConstructedOrHaveNext):
986         (WebCore::RenderBlock::createLineBoxes):
987
988 2011-02-01  Abhishek Arya  <inferno@chromium.org>
989
990         Reviewed by Dan Bernstein.
991
992         Do not add a node in the document's stylesheet candidate node list if the
993         node is already removed from document.
994         https://bugs.webkit.org/show_bug.cgi?id=53441
995
996         Test: fast/css/stylesheet-candidate-nodes-crash.xhtml
997
998         * dom/Document.cpp:
999         (WebCore::Document::addStyleSheetCandidateNode):
1000
1001 2011-02-01  Dave Hyatt  <hyatt@apple.com>
1002
1003         Reviewed by Darin Adler.
1004
1005         https://bugs.webkit.org/show_bug.cgi?id=46422, make printing and pagination work
1006         with vertical text.
1007
1008         Change printing functions to check writing-mode and properly swap width and height
1009         as needed.
1010         
1011         Fix the setScrollOrigin function so that the origin doesn't cause
1012         scroll spasming during printing (this is only partially successful, but it's better
1013         than it was).
1014
1015         Rewrite computePageRects to handle both RTL documents properly as well as vertical
1016         text documents properly.
1017
1018         * WebCore.exp.in:
1019         * page/FrameView.cpp:
1020         (WebCore::FrameView::adjustViewSize):
1021         (WebCore::FrameView::forceLayoutForPagination):
1022         * page/PrintContext.cpp:
1023         (WebCore::PrintContext::computePageRects):
1024         (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
1025         (WebCore::PrintContext::computeAutomaticScaleFactor):
1026         (WebCore::PrintContext::spoolPage):
1027         (WebCore::PrintContext::spoolRect):
1028         * page/PrintContext.h:
1029         * page/mac/WebCoreFrameView.h:
1030         * platform/ScrollView.cpp:
1031         (WebCore::ScrollView::wheelEvent):
1032         * platform/ScrollView.h:
1033         * platform/mac/ScrollViewMac.mm:
1034         (WebCore::ScrollView::platformSetScrollOrigin):
1035         * rendering/RenderView.cpp:
1036         (WebCore::RenderView::layout):
1037
1038 2011-02-01  Mikhail Naganov  <mnaganov@chromium.org>
1039
1040         Reviewed by Pavel Feldman.
1041
1042         Web Inspector: Fix profiles reset to avoid clearing heap profiles in Chromium.
1043
1044         https://bugs.webkit.org/show_bug.cgi?id=53500
1045
1046         * inspector/InspectorProfilerAgent.cpp:
1047         (WebCore::InspectorProfilerAgent::resetFrontendProfiles):
1048
1049 2011-02-01  Mikhail Naganov  <mnaganov@chromium.org>
1050
1051         Reviewed by Pavel Feldman.
1052
1053         Web Inspector: [Chromium] Landing detailed heap snapshots, part 1.
1054
1055         https://bugs.webkit.org/show_bug.cgi?id=53173
1056
1057         Adding code for accessing heap snapshot data and
1058         performing graph calculations.
1059
1060         * English.lproj/localizedStrings.js:
1061         * inspector/front-end/HeapSnapshot.js:
1062         (WebInspector.HeapSnapshotArraySlice): Helper class to avoid array contents copying.
1063         (WebInspector.HeapSnapshotEdge): Wrapper for accessing graph edge properties.
1064         (WebInspector.HeapSnapshotEdgeIterator):
1065         (WebInspector.HeapSnapshotNode): Wrapper for accessing graph node properties.
1066         (WebInspector.HeapSnapshotNodeIterator):
1067         (WebInspector.HeapSnapshot): Wrapper for the heap snapshot.
1068         (WebInspector.HeapSnapshotFilteredOrderedIterator):
1069         (WebInspector.HeapSnapshotEdgesProvider):
1070         (WebInspector.HeapSnapshotNodesProvider):
1071         (WebInspector.HeapSnapshotPathFinder):
1072         * inspector/front-end/HeapSnapshotView.js:
1073         (WebInspector.HeapSnapshotView.prototype._convertSnapshot):
1074
1075 2011-02-01  Adam Roben  <aroben@apple.com>
1076
1077         Fix linker warnings in Release_LTCG builds
1078
1079         * WebCore.vcproj/WebCore.vcproj: Exclude EventNames.cpp and EventTarget.cpp from all
1080         configurations, since they get pulled in via DOMAllInOne.cpp.
1081
1082 2011-02-01  Alexander Pavlov  <apavlov@chromium.org>
1083
1084         Reviewed by Yury Semikhatsky.
1085
1086         Web Inspector: [Chromium] Wrongly labelled context-menu item for links in Web Inspector's side-pane
1087         https://bugs.webkit.org/show_bug.cgi?id=53482
1088
1089         * English.lproj/localizedStrings.js:
1090         * inspector/front-end/ElementsPanel.js:
1091         (WebInspector.ElementsPanel.prototype.populateHrefContextMenu):
1092         * inspector/front-end/inspector.js:
1093         (WebInspector.resourceForURL):
1094         (WebInspector.openLinkExternallyLabel):
1095
1096 2011-02-01  Anton Muhin  <antonm@chromium.org>
1097
1098         Reviewed by Adam Barth.
1099
1100         Propagate parent document security origin to newly create Document XML response
1101         https://bugs.webkit.org/show_bug.cgi?id=53444
1102
1103         Covered by the existing tests.
1104
1105         * xml/XMLHttpRequest.cpp:
1106         (WebCore::XMLHttpRequest::responseXML):
1107
1108 2011-02-01  Yury Semikhatsky  <yurys@chromium.org>
1109
1110         Unreviewed. Rollout r77230 which caused many layout tests
1111         crashes on Chromium Debug bots.
1112
1113         Async event handlers should not fire within a modal dialog
1114         https://bugs.webkit.org/show_bug.cgi?id=53202
1115
1116         * dom/Document.cpp:
1117         (WebCore::Document::Document):
1118         * dom/EventQueue.cpp:
1119         (WebCore::EventQueue::EventQueue):
1120         (WebCore::EventQueue::enqueueEvent):
1121         (WebCore::EventQueue::pendingEventTimerFired):
1122         * dom/EventQueue.h:
1123
1124 2011-02-01  Zoltan Herczeg  <zherczeg@webkit.org>
1125
1126         Reviewed by Dirk Schulze.
1127
1128         LightElement changes does not require relayout.
1129         https://bugs.webkit.org/show_bug.cgi?id=53232
1130
1131         When an attribute of a LightElement changes, it
1132         send an update message to the lighting filters
1133         to update its corresponding LightSource objects,
1134         and repaint the filters.
1135
1136         Duplicated 'id' attributes removed from svg-filter-animation.svg.
1137
1138         Existing dynamic-update tests covers this feature.
1139
1140         5x speedup on manual-tests/svg-filter-animation.svg
1141
1142         * manual-tests/svg-filter-animation.svg:
1143         * platform/graphics/filters/DistantLightSource.h:
1144         * platform/graphics/filters/FEDiffuseLighting.cpp:
1145         (WebCore::FEDiffuseLighting::setLightingColor):
1146         (WebCore::FEDiffuseLighting::setSurfaceScale):
1147         (WebCore::FEDiffuseLighting::setDiffuseConstant):
1148         (WebCore::FEDiffuseLighting::setKernelUnitLengthX):
1149         (WebCore::FEDiffuseLighting::setKernelUnitLengthY):
1150         * platform/graphics/filters/FEDiffuseLighting.h:
1151         * platform/graphics/filters/LightSource.cpp:
1152         (WebCore::PointLightSource::setX):
1153         (WebCore::PointLightSource::setY):
1154         (WebCore::PointLightSource::setZ):
1155         (WebCore::SpotLightSource::setX):
1156         (WebCore::SpotLightSource::setY):
1157         (WebCore::SpotLightSource::setZ):
1158         (WebCore::SpotLightSource::setPointsAtX):
1159         (WebCore::SpotLightSource::setPointsAtY):
1160         (WebCore::SpotLightSource::setPointsAtZ):
1161         (WebCore::SpotLightSource::setSpecularExponent):
1162         (WebCore::SpotLightSource::setLimitingConeAngle):
1163         (WebCore::DistantLightSource::setAzimuth):
1164         (WebCore::DistantLightSource::setElevation):
1165         (WebCore::LightSource::setAzimuth):
1166         (WebCore::LightSource::setElevation):
1167         (WebCore::LightSource::setX):
1168         (WebCore::LightSource::setY):
1169         (WebCore::LightSource::setZ):
1170         (WebCore::LightSource::setPointsAtX):
1171         (WebCore::LightSource::setPointsAtY):
1172         (WebCore::LightSource::setPointsAtZ):
1173         (WebCore::LightSource::setSpecularExponent):
1174         (WebCore::LightSource::setLimitingConeAngle):
1175         * platform/graphics/filters/LightSource.h:
1176         * platform/graphics/filters/PointLightSource.h:
1177         * platform/graphics/filters/SpotLightSource.h:
1178         * rendering/svg/RenderSVGResourceFilter.cpp:
1179         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
1180         * svg/SVGFEDiffuseLightingElement.cpp:
1181         (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
1182         (WebCore::SVGFEDiffuseLightingElement::lightElementAttributeChanged):
1183         (WebCore::SVGFEDiffuseLightingElement::build):
1184         (WebCore::SVGFEDiffuseLightingElement::findLightElement):
1185         (WebCore::SVGFEDiffuseLightingElement::findLight):
1186         * svg/SVGFEDiffuseLightingElement.h:
1187         * svg/SVGFELightElement.cpp:
1188         (WebCore::SVGFELightElement::svgAttributeChanged):
1189         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1190         (WebCore::SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute):
1191         * svg/SVGFilterPrimitiveStandardAttributes.h:
1192
1193 2011-02-01  Roland Steiner  <rolandsteiner@chromium.org>
1194
1195         Reviewed by Dimitri Glazkov.
1196
1197         Bug 53289 - DOM: Move DocumentOrderedMap from Document into separate files
1198         https://bugs.webkit.org/show_bug.cgi?id=53289
1199
1200         Moving the nested class DocumentOrderedMap from Document into separate files,
1201         updating code where necessary.
1202
1203         No new tests. (refactoring)
1204
1205         * Android.mk:
1206         * CMakeLists.txt:
1207         * GNUMakefile.am:
1208         * WebCore.gypi:
1209         * WebCore.pro:
1210         * WebCore.vcproj/WebCore.vcproj:
1211         * WebCore.xcodeproj/project.pbxproj:
1212         * dom/Document.cpp:
1213         (WebCore::Document::getElementById):
1214         (WebCore::Document::getImageMap):
1215         * dom/Document.h:
1216         * dom/DocumentOrderedMap.cpp: Added.
1217         (WebCore::keyMatchesId):
1218         (WebCore::keyMatchesMapName):
1219         (WebCore::keyMatchesLowercasedMapName):
1220         (WebCore::DocumentOrderedMap::clear):
1221         (WebCore::DocumentOrderedMap::add):
1222         (WebCore::DocumentOrderedMap::remove):
1223         (WebCore::DocumentOrderedMap::get):
1224         (WebCore::DocumentOrderedMap::getElementById):
1225         (WebCore::DocumentOrderedMap::getElementByMapName):
1226         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
1227         * dom/DocumentOrderedMap.h: Added.
1228         (WebCore::DocumentOrderedMap::contains):
1229         (WebCore::DocumentOrderedMap::containsMultiple):
1230         * dom/DOMAllInOne.cpp:
1231
1232 2011-02-01  Mario Sanchez Prada  <msanchez@igalia.com>
1233
1234         Reviewed by Martin Robinson.
1235
1236         [Gtk] atk_text_set_caret_offset fails for list items
1237         https://bugs.webkit.org/show_bug.cgi?id=53388
1238
1239         Allow using text ranges across list items.
1240
1241         * accessibility/gtk/AccessibilityObjectAtk.cpp:
1242         (WebCore::AccessibilityObject::allowsTextRanges): Add list items
1243         to the list of accessibility objects supporting text ranges.
1244
1245 2011-02-01  Mario Sanchez Prada  <msanchez@igalia.com>
1246
1247         Reviewed by Martin Robinson.
1248
1249         [GTK] character range extents is off when the end of a wrapped line is included
1250         https://bugs.webkit.org/show_bug.cgi?id=53323
1251
1252         Fixed wrong calculation getting the range extents.
1253
1254         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1255         (webkit_accessible_text_get_range_extents): Removed '+1' since the
1256         requested interval shouldn't include the last character.
1257
1258 2011-02-01  Mario Sanchez Prada  <msanchez@igalia.com>
1259
1260         Reviewed by Martin Robinson.
1261
1262         [GTK] Caret Offset is one off at the end of wrapped lines
1263         https://bugs.webkit.org/show_bug.cgi?id=53300
1264
1265         Consider linebreaks as special cases.
1266
1267         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1268         (objectAndOffsetUnignored): In order to avoid getting wrong values
1269         when around linebreaks, we need to workaround this by explicitly
1270         avoiding those '\n' text nodes from affecting the result of
1271         calling to TextIterator:rangeLength().
1272
1273 2011-02-01  Roland Steiner  <rolandsteiner@chromium.org>
1274
1275         Unreviewed, rolling out r77229.
1276         http://trac.webkit.org/changeset/77229
1277         https://bugs.webkit.org/show_bug.cgi?id=53289
1278
1279         revert mysterious build breakage
1280
1281         * Android.mk:
1282         * CMakeLists.txt:
1283         * GNUmakefile.am:
1284         * WebCore.gypi:
1285         * WebCore.pro:
1286         * WebCore.vcproj/WebCore.vcproj:
1287         * WebCore.xcodeproj/project.pbxproj:
1288         * dom/DOMAllInOne.cpp:
1289         * dom/Document.cpp:
1290         (WebCore::Document::DocumentOrderedMap::clear):
1291         (WebCore::Document::DocumentOrderedMap::add):
1292         (WebCore::Document::DocumentOrderedMap::remove):
1293         (WebCore::Document::DocumentOrderedMap::get):
1294         (WebCore::keyMatchesId):
1295         (WebCore::Document::getElementById):
1296         (WebCore::keyMatchesMapName):
1297         (WebCore::keyMatchesLowercasedMapName):
1298         (WebCore::Document::getImageMap):
1299         * dom/Document.h:
1300         (WebCore::Document::DocumentOrderedMap::contains):
1301         (WebCore::Document::DocumentOrderedMap::containsMultiple):
1302         * dom/DocumentOrderedMap.cpp: Removed.
1303         * dom/DocumentOrderedMap.h: Removed.
1304
1305 2011-02-01  Mihai Parparita  <mihaip@chromium.org>
1306
1307         Reviewed by James Robinson.
1308
1309         Async event handlers should not fire within a modal dialog
1310         https://bugs.webkit.org/show_bug.cgi?id=53202
1311
1312         Asychronous events that use EventQueue would currently fire while a
1313         modal dialog (e.g. window.alert()) was up. Change EventQueue to use a
1314         SuspendableTimer (which automatically gets suspended while dialogs are
1315         up and in other cases where JS execution is not allowed).
1316         
1317         Test: fast/events/scroll-event-during-modal-dialog.html
1318
1319         * dom/Document.cpp:
1320         (WebCore::Document::Document):
1321         * dom/EventQueue.cpp:
1322         (WebCore::EventQueueTimer::EventQueueTimer):
1323         (WebCore::EventQueueTimer::fired):
1324         (WebCore::EventQueue::EventQueue):
1325         (WebCore::EventQueue::enqueueEvent):
1326         (WebCore::EventQueue::pendingEventTimerFired):
1327         * dom/EventQueue.h:
1328         (WebCore::EventQueue::create):
1329
1330 2011-02-01  Roland Steiner  <rolandsteiner@chromium.org>
1331
1332         Reviewed by Dimitri Glazkov.
1333
1334         Bug 53289 - DOM: Move DocumentOrderedMap from Document into separate files
1335         https://bugs.webkit.org/show_bug.cgi?id=53289
1336
1337         Moving the nested class DocumentOrderedMap from Document into separate files,
1338         updating code where necessary.
1339
1340         No new tests. (refactoring)
1341
1342         * Android.mk:
1343         * CMakeLists.txt:
1344         * GNUMakefile.am:
1345         * WebCore.gypi:
1346         * WebCore.pro:
1347         * WebCore.vcproj/WebCore.vcproj:
1348         * WebCore.xcodeproj/project.pbxproj:
1349         * dom/Document.cpp:
1350         (WebCore::Document::getElementById):
1351         (WebCore::Document::getImageMap):
1352         * dom/Document.h:
1353         * dom/DocumentOrderedMap.cpp: Added.
1354         (WebCore::keyMatchesId):
1355         (WebCore::keyMatchesMapName):
1356         (WebCore::keyMatchesLowercasedMapName):
1357         (WebCore::DocumentOrderedMap::clear):
1358         (WebCore::DocumentOrderedMap::add):
1359         (WebCore::DocumentOrderedMap::remove):
1360         (WebCore::DocumentOrderedMap::get):
1361         (WebCore::DocumentOrderedMap::getElementById):
1362         (WebCore::DocumentOrderedMap::getElementByMapName):
1363         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
1364         * dom/DocumentOrderedMap.h: Added.
1365         (WebCore::DocumentOrderedMap::contains):
1366         (WebCore::DocumentOrderedMap::containsMultiple):
1367         * dom/DOMAllInOne.cpp:
1368
1369 2011-02-01  Naoki Takano  <takano.naoki@gmail.com>
1370
1371         Reviewed by Darin Fisher.
1372
1373         [Chromium] Autofill should work with HTML5 form elements
1374         https://bugs.webkit.org/show_bug.cgi?id=51809
1375         http://crbug.com/65654
1376
1377         No new tests, because this fix is for Chromium project and hard to test only in WebKit project.
1378
1379         * html/InputType.h: Insert comment for canSetSuggestedValue().
1380         * html/TextFieldInputType.cpp:
1381         (WebCore::TextFieldInputType::canSetSuggestedValue): Implemented to return always true for that all text filed inputs can be completed.
1382         * html/TextFieldInputType.h: Declare canSetSuggestedValue().
1383         * html/TextInputType.cpp: Delete canSetSuggestedValue() not to return true anymore.
1384         * html/TextInputType.h: Delete canSetSuggestedValue() not to return true anymore.
1385
1386 2011-02-01  Kent Tamura  <tkent@chromium.org>
1387
1388         Reviewed by Dan Bernstein.
1389
1390         REGRESSION (r65062): Safari loops forever under WebCore::plainTextToMallocAllocatedBuffer()
1391         https://bugs.webkit.org/show_bug.cgi?id=53272
1392
1393         * editing/TextIterator.cpp:
1394         (WebCore::TextIterator::handleTextBox): Pass the appropriate renderer to emitText().
1395
1396 2011-01-31  Alexey Proskuryakov  <ap@apple.com>
1397
1398         Reviewed by Maciej Stachowiak.
1399
1400         https://bugs.webkit.org/show_bug.cgi?id=53466
1401         Move WebKit2 to printing via API methods
1402
1403         * WebCore.exp.in: Export IntRect::scale().
1404
1405 2011-01-31  Patrick Gansterer  <paroga@webkit.org>
1406
1407         Reviewed by Adam Barth.
1408
1409         Remove obsolete comment after r41871
1410         https://bugs.webkit.org/show_bug.cgi?id=53406
1411
1412         * dom/Document.h:
1413
1414 2011-01-31  Simon Fraser  <simon.fraser@apple.com>
1415
1416         Fix according to reviewer comments: can just use Color::black now.
1417
1418         * platform/graphics/ShadowBlur.cpp:
1419         (WebCore::ShadowBlur::drawInsetShadow):
1420         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
1421
1422 2011-01-31  Simon Fraser  <simon.fraser@apple.com>
1423
1424         Reviewed by Sam Weinig.
1425
1426         Clean up ShadowBlur
1427         https://bugs.webkit.org/show_bug.cgi?id=53472
1428
1429         Some minor ShadowBlur cleanup.
1430
1431         * platform/graphics/ShadowBlur.h:
1432         * platform/graphics/ShadowBlur.cpp:
1433         (WebCore::ShadowBlur::ShadowBlur): Use m_blurRadius rather than the radius
1434         paramter.
1435         (WebCore::ShadowBlur::adjustBlurRadius): Renamed from adjustBlurDistance.
1436         (WebCore::ShadowBlur::calculateLayerBoundingRect): Rename layerFloatRect to
1437         layerRect. Make frameSize a float.
1438         (WebCore::ShadowBlur::beginShadowLayer): This now takes a precomputed
1439         layerRect rather than calling calculateLayerBoundingRect() to compute
1440         it itself, since we were calling calculateLayerBoundingRect() twice.
1441         (WebCore::ShadowBlur::drawRectShadow): Optimize to call calculateLayerBoundingRect()
1442         only once. The shadowRect variable was unused, so two return paths could be
1443         collapsed into one.
1444         (WebCore::ShadowBlur::drawInsetShadow): Call calculateLayerBoundingRect() before
1445         beginShadowLayer() now.
1446         (WebCore::ShadowBlur::drawRectShadowWithoutTiling): The layerRect gets passed in.
1447         We always used alpha=1, so no need to pass that in.
1448         (WebCore::ShadowBlur::drawRectShadowWithTiling): We always used alpha=1, so no need to
1449         pass that in. Move shadowRect down to first use.
1450         ShadowBlur::clipBounds() was unused.
1451
1452 2011-01-31  No'am Rosenthal  <noam.rosenthal@nokia.com>
1453
1454         Reviewed by Kenneth Rohde Christiansen.
1455
1456         [Qt] QWebElements example from QtWebKit Bridge documentation does not work at all
1457         https://bugs.webkit.org/show_bug.cgi?id=46748
1458
1459         This problem disappears when we register QWebElement using qRegisterMetaType, which we now do in QtInstance.
1460         Added a regression test to tst_QWebFrame.
1461
1462         * bridge/qt/qt_instance.cpp:
1463         (JSC::Bindings::QtInstance::QtInstance):
1464
1465 2011-01-27  MORITA Hajime  <morrita@google.com>
1466
1467         Reviewed by Dimitri Glazkov.
1468         
1469         Convert <progress> shadow DOM to a DOM-based shadow.
1470         https://bugs.webkit.org/show_bug.cgi?id=50660
1471
1472         * Removed RenderProgress::m_valuePart, moved the shadow node
1473           to the shadow root of HTMLProgressElement.
1474         * Removed hard-coded pseudo ID for -webkit-progress-bar-value.
1475           ProgressBarValueElement is defined only for overriding
1476           shadowPseudoId().
1477         
1478         No new tests. No behavioral change.
1479
1480         * css/CSSSelector.cpp:
1481         (WebCore::CSSSelector::pseudoId):
1482         (WebCore::nameToPseudoTypeMap):
1483         (WebCore::CSSSelector::extractPseudoType):
1484         * css/CSSSelector.h:
1485         * html/HTMLProgressElement.cpp:
1486         (WebCore::ProgressBarValueElement::ProgressBarValueElement):
1487         (WebCore::ProgressBarValueElement::shadowPseudoId):
1488         (WebCore::ProgressBarValueElement::create):
1489         (WebCore::ProgressBarValueElement::detach):
1490         (WebCore::HTMLProgressElement::parseMappedAttribute):
1491         (WebCore::HTMLProgressElement::attach):
1492         (WebCore::HTMLProgressElement::valuePart):
1493         (WebCore::HTMLProgressElement::didElementStateChange):
1494         (WebCore::HTMLProgressElement::createShadowSubtreeIfNeeded):
1495         * html/HTMLProgressElement.h:
1496         * rendering/RenderProgress.cpp:
1497         (WebCore::RenderProgress::~RenderProgress):
1498         (WebCore::RenderProgress::updateFromElement):
1499         (WebCore::RenderProgress::layoutParts):
1500         (WebCore::RenderProgress::shouldHaveParts):
1501         (WebCore::RenderProgress::valuePart):
1502         * rendering/RenderProgress.h:
1503         * rendering/style/RenderStyleConstants.h:
1504
1505 2011-01-31  Charlie Reis  <creis@chromium.org>
1506
1507         Reviewed by Mihai Parparita.
1508
1509         Add sanity check to help diagnose bug 52819
1510         https://bugs.webkit.org/show_bug.cgi?id=53402
1511
1512         Crash early if the children of fromItem look invalid.
1513
1514         * loader/HistoryController.cpp:
1515
1516 2011-01-31  Kalle Vahlman  <kalle.vahlman@movial.com>
1517
1518         Reviewed by Andreas Kling.
1519
1520         [Qt] canvas.drawImage(HTMLVideoElement) doesn't work with Qt Multimedia backend
1521         https://bugs.webkit.org/show_bug.cgi?id=53325
1522
1523         Reimplement paintCurrentFrameInContext() rather than delegate the
1524         rendering to paint() to make sure we really do get the video frame
1525         content into the GraphicsContext, regardless of accelerated
1526         compositing and the video scene state.
1527
1528         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
1529         (WebCore::MediaPlayerPrivateQt::paintCurrentFrameInContext):
1530         * platform/graphics/qt/MediaPlayerPrivateQt.h:
1531
1532 2011-01-31  Emil A Eklund  <eae@chromium.org>
1533
1534         Reviewed by Darin Adler.
1535
1536         Setting "selected" attribute to false should have no effect in single line <select>
1537         https://bugs.webkit.org/show_bug.cgi?id=52436
1538
1539         Change SelectElement::setSelectedIndex to select the first selectable
1540         option when the select state of all options is set to false as required
1541         by the HTML5 specification.
1542
1543         Test: fast/dom/HTMLSelectElement/selected-false.html
1544
1545         * dom/SelectElement.cpp:
1546         (WebCore::SelectElement::setSelectedIndex):
1547
1548 2011-01-31  Alexander Pavlov  <apavlov@chromium.org>
1549
1550         Reviewed by Yury Semikhatsky.
1551
1552         Web Inspector: Console source references need a left-margin
1553         https://bugs.webkit.org/show_bug.cgi?id=53308
1554
1555         * inspector/front-end/inspector.css:
1556         (.console-message-url): Added a 4px margin on the left.
1557
1558 2011-01-31  Carol Szabo  <carol.szabo@nokia.com>
1559
1560         Reviewed by David Hyatt.
1561
1562         Code Changes only.
1563
1564         It is needlessly expensive to find the generating node from an anonymous renderer of a pseudoelement.
1565         https://bugs.webkit.org/show_bug.cgi?id=53024
1566
1567         No new tests. No change in functionality
1568
1569         * rendering/RenderObject.h:
1570         (WebCore::RenderObject::before):
1571         (WebCore::RenderObject::after):
1572         (WebCore::RenderObject::generatingNode):
1573         Added new accessors for the use of the CSS 2.1 counters code
1574         (mainlyly)
1575         * rendering/RenderObjectChildList.cpp:
1576         (WebCore::beforeAfterContainer):
1577         (WebCore::RenderObjectChildList::invalidateCounters):
1578         (WebCore::RenderObjectChildList::before):
1579         (WebCore::RenderObjectChildList::after):
1580         Refactored the code to take advantage of the new accessors.
1581         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
1582         Changed to store the generating node in the :before and :after
1583         renderers.
1584         * rendering/RenderObjectChildList.h:
1585
1586 2011-01-31  Krithigassree Sambamurthy  <krithigassree.sambamurthy@nokia.com>
1587
1588         Reviewed by David Hyatt.
1589
1590         Add background-clip to background shorthand
1591         https://bugs.webkit.org/show_bug.cgi?id=52080
1592
1593         Added background-clip to background-shorthand. Also made changes to
1594         include webkitMaskClip to the mask shorthand to keep both in sync.
1595
1596         * css/CSSParser.cpp:
1597         (WebCore::CSSParser::parseValue):
1598         (WebCore::CSSParser::parseFillShorthand):
1599
1600 2011-01-31  Darin Adler  <darin@apple.com>
1601
1602         Reviewed by Adele Peterson.
1603
1604         WKView should support scrollPageDown:, scrollPageUp:, scrollToBeg and other similar selectors
1605         https://bugs.webkit.org/show_bug.cgi?id=53460
1606
1607         * editing/EditorCommand.cpp:
1608         (WebCore::executeScrollPageBackward): Added.
1609         (WebCore::executeScrollPageForward): Added.
1610         (WebCore::executeScrollToBeginningOfDocument): Added.
1611         (WebCore::executeScrollToEndOfDocument): Added.
1612         (WebCore::createCommandMap): Added the four commands above to the map.
1613
1614 2011-01-31  Dan Bernstein  <mitz@apple.com>
1615
1616         Reviewed by Adele Peterson.
1617
1618         Inter-ideograph justification should apply to hiragana and katakana as well
1619         https://bugs.webkit.org/show_bug.cgi?id=53464
1620
1621         Changed the test for expansion opportunities from isCJKIdeograph() to isCJKIdeographOrSymbol().
1622
1623         * platform/graphics/Font.cpp:
1624         (WebCore::Font::expansionOpportunityCount):
1625         * platform/graphics/WidthIterator.cpp:
1626         (WebCore::WidthIterator::advance):
1627         * platform/graphics/mac/ComplexTextController.cpp:
1628         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1629
1630 2011-01-31  Dimitri Glazkov  <dglazkov@chromium.org>
1631
1632         Reviewed by James Robinson.
1633
1634         REGRESSION(r76951): Appearance of media controls changed slightly on Qt/Chromium ports
1635         https://bugs.webkit.org/show_bug.cgi?id=53314
1636
1637         Fixes media/controls-strict.html on Chromium.
1638
1639         * css/mediaControlsChromium.css:
1640         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
1641             Added proper box-sizing to avoid differences between strict/quirks mode.
1642
1643 2011-01-31  Kent Tamura  <tkent@chromium.org>
1644
1645         Reviewed by Dimitri Glazkov.
1646
1647         Validation message bubble shouldn't inherit text-security style
1648         https://bugs.webkit.org/show_bug.cgi?id=53457
1649
1650         No new tests because the validation message feature depends on timers
1651         and is enabled only in Chromium port.
1652
1653         * css/html.css:
1654         (::-webkit-validation-bubble): Reset -webkit-text-security.
1655
1656 2011-01-31  Michael Saboff  <msaboff@apple.com>
1657
1658         Reviewed by Geoffrey Garen.
1659
1660         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
1661         https://bugs.webkit.org/show_bug.cgi?id=53271
1662
1663         Reapplying this patch again. 
1664         The removal of this patch in <http://trac.webkit.org/changeset/77125>
1665         as part of https://bugs.webkit.org/show_bug.cgi?id=53418,
1666         removed the both the first (failing) patch (r76893) and this fixed 
1667         patch (r76969).  This patch includes slight changes necessitated by
1668         r77151.
1669
1670         Reapplying this patch with the change that the second ASSERT in 
1671         RootObject::removeRuntimeObject was changed to use
1672         .uncheckedGet() instead of the failing .get().  The object in question
1673         could be in the process of being GC'ed.  The get() call will not return
1674         such an object while the uncheckedGet() call will return the (unsafe) 
1675         object.  This is the behavior we want.
1676
1677         Precautionary change.
1678         Changed RootObject to use WeakGCMap instead of HashSet.
1679         Found will looking for another issue, but can't produce a test case
1680         that is problematic.  THerefore there aren't any new tests.
1681
1682         * bridge/runtime_root.cpp:
1683         (JSC::Bindings::RootObject::invalidate):
1684         (JSC::Bindings::RootObject::addRuntimeObject):
1685         (JSC::Bindings::RootObject::removeRuntimeObject):
1686         * bridge/runtime_root.h:
1687
1688 2011-01-31  Andreas Kling  <kling@webkit.org>
1689
1690         Unbreak Qt build after r77151.
1691
1692         * bridge/qt/qt_instance.cpp:
1693         (JSC::Bindings::QtInstance::removeCachedMethod):
1694         (JSC::Bindings::QtInstance::markAggregate):
1695
1696 2011-01-31  takano takumi  <takano@apple.com>
1697
1698         Reviewed by Dave Hyatt.
1699
1700         Implement text-combine rendering code
1701         https://bugs.webkit.org/show_bug.cgi?id=50621
1702
1703         Test: fast/text/international/text-combine-image-test.html
1704
1705         * Android.mk: Added RenderCombineText.cpp/h
1706         * CMakeLists.txt: Added RenderCombineText.cpp/h
1707         * GNUmakefile.am: Added RenderCombineText.cpp/h
1708         * WebCore.exp.in:
1709         * WebCore.gypi: Added RenderCombineText.cpp/h
1710         * WebCore.pro: Added RenderCombineText.cpp/h
1711         * WebCore.vcproj/WebCore.vcproj: Added RenderCombineText.cpp/h
1712         * WebCore.xcodeproj/project.pbxproj: Added RenderCombineText.cpp/h
1713         * css/CSSFontFaceSource.cpp:
1714         (WebCore::CSSFontFaceSource::getFontData):
1715         - Added fontDescription.widthVariant to SimpleFontData creation.
1716         * css/CSSStyleSelector.cpp:
1717         (WebCore::CSSStyleSelector::applyProperty):
1718         - Changed to set "Unique" flag to RenderStyle in case of TextCombine.
1719         * dom/Text.cpp:
1720         (WebCore::Text::createRenderer):
1721         - Changed to create RenderCombineText in case of TextCombine.
1722         * loader/cache/CachedFont.cpp:
1723         (WebCore::CachedFont::platformDataFromCustomData):
1724         - Added FontWidthVariant as an argument for FontPlatformData creation.
1725         * loader/cache/CachedFont.h:
1726         - Ditto.
1727         * platform/graphics/Font.h:
1728         (WebCore::Font::widthVariant):
1729         - The accessor to FontWidthVariant member variable.
1730         * platform/graphics/FontCache.cpp:
1731         - Made cache to incorporate FontWidthVariant value.
1732         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
1733         (WebCore::FontPlatformDataCacheKey::operator==):
1734         (WebCore::computeHash):
1735         (WebCore::FontCache::getCachedFontPlatformData):
1736         * platform/graphics/FontDescription.h:
1737         - Add a member variable that holds a width variant - none, half-width, third-width, and quarter-width.
1738         (WebCore::FontDescription::FontDescription):
1739         (WebCore::FontDescription::widthVariant):
1740         (WebCore::FontDescription::setWidthVariant):
1741         (WebCore::FontDescription::operator==):
1742         * platform/graphics/FontWidthVariant.h: Added.
1743         * platform/graphics/cairo/FontCustomPlatformData.h:
1744         - Changed to carry FontWidthVariant value.
1745         * platform/graphics/cocoa/FontPlatformData.h:
1746         - Changed to carry FontWidthVariant value.
1747         (WebCore::FontPlatformData::FontPlatformData):
1748         (WebCore::FontPlatformData::widthVariant):
1749         (WebCore::FontPlatformData::hash):
1750         (WebCore::FontPlatformData::operator==):
1751         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1752         (WebCore::FontPlatformData::FontPlatformData):
1753         - Changed to carry FontWidthVariant value.
1754         (WebCore::FontPlatformData::operator=):
1755         - Ditto.
1756         (WebCore::mapFontWidthVariantToCTFeatureSelector):
1757         - A function to map a FontWidthVariant value to a CoreText's text spacing feature selector.
1758         (WebCore::FontPlatformData::ctFont):
1759         - Changed to create CTFont with text spacing variant based on FontWidthVariant.
1760         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
1761         (WebCore::FontCustomPlatformData::fontPlatformData):
1762         - Changed to carry FontWidthVariant value.
1763         * platform/graphics/haiku/FontCustomPlatformData.cpp:
1764         (WebCore::FontCustomPlatformData::fontPlatformData):
1765         - Changed to carry FontWidthVariant value.
1766         * platform/graphics/haiku/FontCustomPlatformData.h:
1767         * platform/graphics/mac/FontCacheMac.mm:
1768         (WebCore::FontCache::createFontPlatformData):
1769         - Changed to carry FontWidthVariant value.
1770         * platform/graphics/mac/FontCustomPlatformData.cpp:
1771         (WebCore::FontCustomPlatformData::fontPlatformData):
1772         - Changed to carry FontWidthVariant value.
1773         * platform/graphics/mac/FontCustomPlatformData.h:
1774         - Ditto.
1775         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1776         (WebCore::shouldUseCoreText):
1777         - Changed to skip CT path when width variant is specified.
1778         * platform/graphics/pango/FontCustomPlatformDataPango.cpp:
1779         (WebCore::FontCustomPlatformData::fontPlatformData):
1780         - Ditto.
1781         * platform/graphics/qt/FontCustomPlatformData.h:
1782         - Ditto.
1783         * platform/graphics/qt/FontCustomPlatformDataQt.cpp:
1784         (WebCore::FontCustomPlatformData::fontPlatformData):
1785         - Ditto.
1786         * platform/graphics/skia/FontCustomPlatformData.cpp:
1787         (WebCore::FontCustomPlatformData::fontPlatformData):
1788         - Ditto.
1789         * platform/graphics/skia/FontCustomPlatformData.h:
1790         - Ditto.
1791         * platform/graphics/win/FontCustomPlatformData.cpp:
1792         (WebCore::FontCustomPlatformData::fontPlatformData):
1793         - Ditto.
1794         * platform/graphics/win/FontCustomPlatformData.h:
1795         - Ditto.
1796         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1797         - Ditto.
1798         (WebCore::FontCustomPlatformData::fontPlatformData):
1799         - Ditto.
1800         * platform/graphics/win/FontCustomPlatformDataCairo.h:
1801         - Ditto.
1802         * platform/graphics/wince/FontCustomPlatformData.cpp:
1803         (WebCore::FontCustomPlatformData::fontPlatformData):
1804         - Ditto.
1805         * platform/graphics/wince/FontCustomPlatformData.h:
1806         - Ditto.
1807         * platform/graphics/wx/FontCustomPlatformData.cpp:
1808         (WebCore::FontCustomPlatformData::fontPlatformData):
1809         - Ditto.
1810         * platform/graphics/wx/FontCustomPlatformData.h:
1811         - Ditto.
1812         * rendering/InlineTextBox.cpp:
1813         (WebCore::InlineTextBox::paint):
1814         - In case of RenderCombineText, we don't rotate text even in vertical writing. Also, we render original text
1815         instead of text returned from text().
1816         * rendering/RenderBlock.cpp:
1817         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1818         - Made to call RenderCombinedText's prepareTextCombine() here.
1819         * rendering/RenderBlockLineLayout.cpp:
1820         (WebCore::textWidth):
1821         - Made to always use the render object's width() in case of TextCombine.
1822         (WebCore::RenderBlock::findNextLineBreak):
1823         - Made to call RenderCombinedText's prepareTextCombine() here.
1824         * rendering/RenderCombineText.cpp: Added. A subclass of RenderText.
1825         (WebCore::RenderCombineText::RenderCombineText):
1826         (WebCore::RenderCombineText::styleDidChange):
1827         - Clear the flag that indicated the font has been prepared for combining. The font will be reinitialized in
1828         the next call of RenderBlock::findNextLineBreak().
1829         (WebCore::RenderCombineText::setTextInternal):
1830         - Ditto.
1831         (WebCore::RenderCombineText::width):
1832         - Returns 1-em width in case of font combine.
1833         (WebCore::RenderCombineText::adjustTextOrigin):
1834         - Adjust drawing origin point in case of font combine.
1835         (WebCore::RenderCombineText::charactersToRender):
1836         - Return original text instead of current text in case of font combine.
1837         (WebCore::RenderCombineText::combineText):
1838         - This function tries to pack passed text with; 1) the current font as is, 2) the font created
1839         from the descriptor with half-width variant specified, 3) the font with third-width variant, 4) the font
1840         with quarter-width variant.
1841         - If a suitable font successfully found, replace the current font with the new font. If no appropriate font found,
1842         we give up text-combine as the CSS spec describes.
1843         - If a new font found, we replace the text with 0xFFFC. This is needed for a combined text block to be able to
1844         behave like a single character against text decorations.
1845         * rendering/RenderCombineText.h: Added.
1846         (WebCore::RenderCombineText::isCombined):
1847         (WebCore::RenderCombineText::combinedTextWidth):
1848         - Returns 1-em width in case of font combine.
1849         (WebCore::RenderCombineText::renderName):
1850         (WebCore::toRenderCombineText):
1851         * rendering/RenderText.cpp:
1852         (WebCore::RenderText::widthFromCache):
1853         - Made to call RenderCombineText's combinedTextWidth when the text is combined.
1854         * rendering/RenderingAllInOne.cpp: Added RenderCombineText.cpp
1855         * rendering/style/RenderStyle.h:
1856         (WebCore::InheritedFlags::hasTextCombine):
1857         - Added for a quick test of TextCombine.
1858
1859 2011-01-31  Oliver Hunt  <oliver@apple.com>
1860
1861         Convert markstack to a slot visitor API
1862         https://bugs.webkit.org/show_bug.cgi?id=53219
1863
1864         rolling r77098, r77099, r77100, r77109, and
1865         r77111 back in, along with a few more Qt fix attempts.
1866
1867         * ForwardingHeaders/runtime/WriteBarrier.h: Added.
1868         * WebCore.exp.in:
1869         * bindings/js/DOMWrapperWorld.h:
1870         (WebCore::DOMWrapperWorld::globalData):
1871         * bindings/js/JSAudioConstructor.cpp:
1872         (WebCore::JSAudioConstructor::JSAudioConstructor):
1873         * bindings/js/JSDOMBinding.cpp:
1874         (WebCore::markDOMNodesForDocument):
1875         (WebCore::markDOMObjectWrapper):
1876         (WebCore::markDOMNodeWrapper):
1877         * bindings/js/JSDOMGlobalObject.cpp:
1878         (WebCore::JSDOMGlobalObject::markChildren):
1879         (WebCore::JSDOMGlobalObject::setInjectedScript):
1880         (WebCore::JSDOMGlobalObject::injectedScript):
1881         * bindings/js/JSDOMGlobalObject.h:
1882         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
1883         (WebCore::getDOMConstructor):
1884         * bindings/js/JSDOMWindowCustom.cpp:
1885         (WebCore::JSDOMWindow::setLocation):
1886         (WebCore::DialogHandler::dialogCreated):
1887         * bindings/js/JSDOMWindowShell.cpp:
1888         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
1889         (WebCore::JSDOMWindowShell::setWindow):
1890         (WebCore::JSDOMWindowShell::markChildren):
1891         (WebCore::JSDOMWindowShell::unwrappedObject):
1892         * bindings/js/JSDOMWindowShell.h:
1893         (WebCore::JSDOMWindowShell::window):
1894         (WebCore::JSDOMWindowShell::setWindow):
1895         * bindings/js/JSDeviceMotionEventCustom.cpp:
1896         (WebCore::createAccelerationObject):
1897         (WebCore::createRotationRateObject):
1898         * bindings/js/JSEventListener.cpp:
1899         (WebCore::JSEventListener::JSEventListener):
1900         (WebCore::JSEventListener::markJSFunction):
1901         * bindings/js/JSEventListener.h:
1902         (WebCore::JSEventListener::jsFunction):
1903         * bindings/js/JSHTMLDocumentCustom.cpp:
1904         (WebCore::JSHTMLDocument::setAll):
1905         * bindings/js/JSImageConstructor.cpp:
1906         (WebCore::JSImageConstructor::JSImageConstructor):
1907         * bindings/js/JSImageDataCustom.cpp:
1908         (WebCore::toJS):
1909         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1910         (WebCore::JSJavaScriptCallFrame::scopeChain):
1911         (WebCore::JSJavaScriptCallFrame::scopeType):
1912         * bindings/js/JSNodeFilterCondition.cpp:
1913         (WebCore::JSNodeFilterCondition::markAggregate):
1914         (WebCore::JSNodeFilterCondition::acceptNode):
1915         * bindings/js/JSNodeFilterCondition.h:
1916         * bindings/js/JSNodeFilterCustom.cpp:
1917         * bindings/js/JSOptionConstructor.cpp:
1918         (WebCore::JSOptionConstructor::JSOptionConstructor):
1919         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1920         (WebCore::JSSQLResultSetRowList::item):
1921         * bindings/js/ScriptCachedFrameData.cpp:
1922         (WebCore::ScriptCachedFrameData::restore):
1923         * bindings/js/ScriptObject.cpp:
1924         (WebCore::ScriptGlobalObject::set):
1925         * bindings/js/SerializedScriptValue.cpp:
1926         (WebCore::CloneDeserializer::putProperty):
1927         * bindings/scripts/CodeGeneratorJS.pm:
1928         * bridge/qt/qt_class.cpp:
1929         (JSC::Bindings::QtClass::fallbackObject):
1930         * bridge/qt/qt_instance.cpp:
1931         (JSC::Bindings::QtInstance::QtInstance):
1932         (JSC::Bindings::QtInstance::removeCachedMethod):
1933         (JSC::Bindings::QtInstance::markAggregate):
1934         * bridge/qt/qt_instance.h:
1935         * bridge/qt/qt_runtime.cpp:
1936         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
1937         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
1938         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
1939         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
1940         * bridge/qt/qt_runtime.h:
1941         * dom/Document.h:
1942
1943 2011-01-31  Dan Winship  <danw@gnome.org>
1944
1945         Reviewed by Gustavo Noronha Silva.
1946
1947         wss (websockets ssl) support for gtk via new gio TLS support
1948         https://bugs.webkit.org/show_bug.cgi?id=50344
1949
1950         Update to use GPollableOutputStream and GTlsConnection to
1951         implement wss URLs
1952
1953         * platform/network/soup/SocketStreamHandle.h:
1954         * platform/network/soup/SocketStreamHandleSoup.cpp:
1955         (WebCore::SocketStreamHandle::SocketStreamHandle):
1956         (WebCore::SocketStreamHandle::connected):
1957         (WebCore::SocketStreamHandle::platformSend):
1958         (WebCore::SocketStreamHandle::beginWaitingForSocketWritability):
1959         (WebCore::writeReadyCallback):
1960
1961 2011-01-31  Abhishek Arya  <inferno@chromium.org>
1962
1963         Reviewed by Dimitri Glazkov.
1964
1965         Check the textarea node still exists in document before casting
1966         it to HTMLTextAreaElement.
1967         https://bugs.webkit.org/show_bug.cgi?id=53429
1968
1969         Test: fast/forms/textarea-node-removed-from-document-crash.html
1970
1971         * rendering/RenderTextControlMultiLine.cpp:
1972         (WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
1973
1974 2011-01-27  Abhishek Arya  <inferno@chromium.org>
1975
1976         Reviewed by Dave Hyatt.
1977
1978         If beforeChild is wrapped in an anonymous table section, we need to
1979         go the parent to find it and use it before adding childs to table.
1980         https://bugs.webkit.org/show_bug.cgi?id=53276
1981
1982         We need to make sure that beforeChild's parent is "this" before calling
1983         RenderBox::addChild. The previous condition in while is too restrictive
1984         and fails to calculate the right beforeChild value when its display
1985         style is table caption.
1986         Test: fast/table/before-child-non-table-section-add-table-crash.html
1987
1988         * rendering/RenderTable.cpp:
1989         (WebCore::RenderTable::addChild):
1990
1991 2011-01-31  Shane Stephens  <shanestephens@google.com>
1992
1993         Reviewed by Simon Fraser.
1994
1995         AffineTransform::translateRight incorrectly computes a translateLeft.
1996         https://bugs.webkit.org/show_bug.cgi?id=52551
1997
1998         Removed translateRight and converted all uses to perform standard
1999         matrix multiplication.
2000
2001         No new tests because patch doesn't modify functionality.
2002
2003         * platform/graphics/transforms/AffineTransform.cpp:
2004         * platform/graphics/transforms/AffineTransform.h:
2005         (WebCore::AffineTransform::translation):
2006         * rendering/svg/RenderSVGResourceMarker.cpp:
2007         (WebCore::RenderSVGResourceMarker::localToParentTransform):
2008         * rendering/svg/RenderSVGRoot.cpp:
2009         (WebCore::RenderSVGRoot::localToRepaintContainerTransform):
2010         (WebCore::RenderSVGRoot::localToParentTransform):
2011         * rendering/svg/RenderSVGViewportContainer.cpp:
2012         (WebCore::RenderSVGViewportContainer::localToParentTransform):
2013         * rendering/svg/SVGTextLayoutEngine.cpp:
2014         (WebCore::SVGTextLayoutEngine::finalizeTransformMatrices):
2015
2016 2011-01-31  Mario Sanchez Prada  <msanchez@igalia.com>
2017
2018         Reviewed by Martin Robinson.
2019
2020         [Gtk] atk_text_set_caret_offset returns True even when it is unsuccessful
2021         https://bugs.webkit.org/show_bug.cgi?id=53389
2022
2023         Return FALSE when not able to set the caret at the specified offset.
2024
2025         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2026         (webkit_accessible_text_set_caret_offset): Return FALSE when the
2027         range created is NULL and adjust offset to account for list markers.
2028
2029 2011-01-28  Pavel Feldman  <pfeldman@chromium.org>
2030
2031         Reviewed by Yury Semikhatsky.
2032
2033         Web Inspector: copy HAR to clipboard instead of saving blob on export.
2034         https://bugs.webkit.org/show_bug.cgi?id=53328
2035
2036         * inspector/front-end/NetworkPanel.js:
2037         (WebInspector.NetworkPanel.prototype._exportAll):
2038         (WebInspector.NetworkPanel.prototype._exportResource):
2039
2040 2011-01-30  Pavel Feldman  <pfeldman@chromium.org>
2041
2042         Reviewed by Timothy Hatcher.
2043
2044         Web Inspector: speed up network panel rendering.
2045         https://bugs.webkit.org/show_bug.cgi?id=53397
2046
2047         * inspector/front-end/DataGrid.js:
2048         (WebInspector.DataGrid.prototype.get scrollContainer):
2049         * inspector/front-end/NetworkPanel.js:
2050         (WebInspector.NetworkPanel.prototype.elementsToRestoreScrollPositionsFor):
2051         (WebInspector.NetworkPanel.prototype._positionSummaryBar):
2052         (WebInspector.NetworkPanel.prototype._createTable):
2053         (WebInspector.NetworkPanel.prototype._exportResource):
2054         (WebInspector.NetworkPanel.prototype._onScroll):
2055         * inspector/front-end/networkPanel.css:
2056         (.network-sidebar .data-grid.small tr.offscreen):
2057         (.network-sidebar .data-grid tr.offscreen):
2058         (.network-sidebar .data-grid tr.offscreen td):
2059
2060 2011-01-31  Peter Varga  <pvarga@webkit.org>
2061
2062         Reviewed by Andreas Kling.
2063
2064         Remove wrec from WebCore
2065         https://bugs.webkit.org/show_bug.cgi?id=53298
2066
2067         No new tests needed.
2068
2069         * Android.jscbindings.mk:
2070         * ForwardingHeaders/wrec/WREC.h: Removed.
2071         * WebCore.vcproj/WebCore.vcproj:
2072         * WebCore.vcproj/copyForwardingHeaders.cmd:
2073
2074 2011-01-31  Sheriff Bot  <webkit.review.bot@gmail.com>
2075
2076         Unreviewed, rolling out r76969.
2077         http://trac.webkit.org/changeset/76969
2078         https://bugs.webkit.org/show_bug.cgi?id=53418
2079
2080         "It is causing crashes in GTK+ and Leopard bots" (Requested by
2081         alexg__ on #webkit).
2082
2083         * bridge/runtime_root.cpp:
2084         (JSC::Bindings::RootObject::invalidate):
2085         (JSC::Bindings::RootObject::addRuntimeObject):
2086         (JSC::Bindings::RootObject::removeRuntimeObject):
2087         * bridge/runtime_root.h:
2088
2089 2011-01-31  Antti Koivisto  <antti@apple.com>
2090
2091         Not reviewed.
2092
2093         Spelling.
2094
2095         * css/CSSSelectorList.h:
2096         (WebCore::CSSSelectorList::next):
2097
2098 2011-01-31  Yury Semikhatsky  <yurys@chromium.org>
2099
2100         Unreviewed. Fix Chromium compilation on Linux.
2101
2102         * platform/graphics/ShadowBlur.cpp: added PLATFORM(CHROMIUM) guard
2103         * platform/graphics/ShadowBlur.h: added missing ColorSpace.h header include
2104
2105 2011-01-31  Yury Semikhatsky  <yurys@chromium.org>
2106
2107         Unreviewed. Fix Chromium compilation on Mac broken by r77101.
2108
2109         * WebCore.gypi: add ShadowBlur.{h,cpp} to the gypi file.
2110
2111 2011-01-31  Mikhail Naganov  <mnaganov@chromium.org>
2112
2113         Reviewed by Yury Semikhatsky.
2114
2115         WebInspector: Change button title from "Clear CPU profiles" to "Clear all profiles".
2116
2117         https://bugs.webkit.org/show_bug.cgi?id=53309
2118
2119         * English.lproj/localizedStrings.js:
2120         * inspector/front-end/ProfilesPanel.js:
2121         (WebInspector.ProfilesPanel):
2122
2123 2011-01-31  Carlos Garcia Campos  <cgarcia@igalia.com>
2124
2125         Unreviewed, fix the build with current GTK+ 3.x.
2126
2127         * plugins/gtk/gtk2xtbin.c:
2128         * plugins/gtk/gtk2xtbin.h:
2129
2130 2011-01-30  Kenichi Ishibashi  <bashi@google.com>
2131
2132         Reviewed by Kent Tamura.
2133
2134         Dangling form associated elements should not be registered on the document
2135         https://bugs.webkit.org/show_bug.cgi?id=53223
2136
2137         Adds insertedIntoDocument() and remvoedFromDocument() to
2138         FormAssociatedElement class to register the element on the document
2139         if and only if it actually inserted into (removed from) the document.
2140
2141         Test: fast/forms/dangling-form-element-crash.html
2142
2143         * html/FormAssociatedElement.cpp:
2144         (WebCore::FormAssociatedElement::insertedIntoDocument): Added.
2145         (WebCore::FormAssociatedElement::removedFromDocument): Ditto.
2146         (WebCore::FormAssociatedElement::insertedIntoTree): Don't register
2147         the element to a document.
2148         (WebCore::FormAssociatedElement::removedFromTree): Don't unregister
2149         the element from a document.
2150         * html/FormAssociatedElement.h:
2151         * html/HTMLFormControlElement.cpp:
2152         (WebCore::HTMLFormControlElement::insertedIntoDocument): Added.
2153         (WebCore::HTMLFormControlElement::removedFromDocument): Ditto.
2154         * html/HTMLFormControlElement.h:
2155         * html/HTMLObjectElement.cpp:
2156         (WebCore::HTMLObjectElement::insertedIntoDocument): Calls
2157         FormAssociatedElement::insertedIntoDocument().
2158         (WebCore::HTMLObjectElement::removedFromDocument): Calls
2159         FormAssociatedElement::removedFromDocument().
2160
2161 2011-01-30  Csaba Osztrogonác  <ossy@webkit.org>
2162
2163         Unreviewed, rolling out r77098, r77099, r77100, r77109, and
2164         r77111.
2165         http://trac.webkit.org/changeset/77098
2166         http://trac.webkit.org/changeset/77099
2167         http://trac.webkit.org/changeset/77100
2168         http://trac.webkit.org/changeset/77109
2169         http://trac.webkit.org/changeset/77111
2170         https://bugs.webkit.org/show_bug.cgi?id=53219
2171
2172         Qt build is broken
2173
2174         * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
2175         * WebCore.exp.in:
2176         * bindings/js/DOMWrapperWorld.h:
2177         * bindings/js/JSAudioConstructor.cpp:
2178         (WebCore::JSAudioConstructor::JSAudioConstructor):
2179         * bindings/js/JSDOMBinding.cpp:
2180         (WebCore::markDOMNodesForDocument):
2181         (WebCore::markDOMObjectWrapper):
2182         (WebCore::markDOMNodeWrapper):
2183         * bindings/js/JSDOMGlobalObject.cpp:
2184         (WebCore::JSDOMGlobalObject::markChildren):
2185         (WebCore::JSDOMGlobalObject::setInjectedScript):
2186         (WebCore::JSDOMGlobalObject::injectedScript):
2187         * bindings/js/JSDOMGlobalObject.h:
2188         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
2189         (WebCore::getDOMConstructor):
2190         * bindings/js/JSDOMWindowCustom.cpp:
2191         (WebCore::JSDOMWindow::setLocation):
2192         (WebCore::DialogHandler::dialogCreated):
2193         * bindings/js/JSDOMWindowShell.cpp:
2194         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
2195         (WebCore::JSDOMWindowShell::setWindow):
2196         (WebCore::JSDOMWindowShell::markChildren):
2197         (WebCore::JSDOMWindowShell::unwrappedObject):
2198         * bindings/js/JSDOMWindowShell.h:
2199         (WebCore::JSDOMWindowShell::window):
2200         (WebCore::JSDOMWindowShell::setWindow):
2201         * bindings/js/JSDeviceMotionEventCustom.cpp:
2202         (WebCore::createAccelerationObject):
2203         (WebCore::createRotationRateObject):
2204         * bindings/js/JSEventListener.cpp:
2205         (WebCore::JSEventListener::JSEventListener):
2206         (WebCore::JSEventListener::markJSFunction):
2207         * bindings/js/JSEventListener.h:
2208         (WebCore::JSEventListener::jsFunction):
2209         * bindings/js/JSHTMLDocumentCustom.cpp:
2210         (WebCore::JSHTMLDocument::setAll):
2211         * bindings/js/JSImageConstructor.cpp:
2212         (WebCore::JSImageConstructor::JSImageConstructor):
2213         * bindings/js/JSImageDataCustom.cpp:
2214         (WebCore::toJS):
2215         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2216         (WebCore::JSJavaScriptCallFrame::scopeChain):
2217         (WebCore::JSJavaScriptCallFrame::scopeType):
2218         * bindings/js/JSNodeFilterCondition.cpp:
2219         (WebCore::JSNodeFilterCondition::markAggregate):
2220         (WebCore::JSNodeFilterCondition::acceptNode):
2221         * bindings/js/JSNodeFilterCondition.h:
2222         * bindings/js/JSNodeFilterCustom.cpp:
2223         * bindings/js/JSOptionConstructor.cpp:
2224         (WebCore::JSOptionConstructor::JSOptionConstructor):
2225         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2226         (WebCore::JSSQLResultSetRowList::item):
2227         * bindings/js/ScriptCachedFrameData.cpp:
2228         (WebCore::ScriptCachedFrameData::restore):
2229         * bindings/js/ScriptObject.cpp:
2230         (WebCore::ScriptGlobalObject::set):
2231         * bindings/js/SerializedScriptValue.cpp:
2232         (WebCore::CloneDeserializer::putProperty):
2233         * bindings/scripts/CodeGeneratorJS.pm:
2234         * bridge/qt/qt_instance.cpp:
2235         (JSC::Bindings::QtInstance::QtInstance):
2236         (JSC::Bindings::QtInstance::removeCachedMethod):
2237         (JSC::Bindings::QtInstance::markAggregate):
2238         * bridge/qt/qt_instance.h:
2239         * bridge/qt/qt_runtime.cpp:
2240         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
2241         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
2242         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
2243         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
2244         * bridge/qt/qt_runtime.h:
2245         * bridge/runtime_root.cpp:
2246         (JSC::Bindings::RootObject::invalidate):
2247         * bridge/runtime_root.h:
2248         * dom/Document.h:
2249
2250 2011-01-30  Sheriff Bot  <webkit.review.bot@gmail.com>
2251
2252         Unreviewed, rolling out r77107.
2253         http://trac.webkit.org/changeset/77107
2254         https://bugs.webkit.org/show_bug.cgi?id=53412
2255
2256         Caused 5 new form-related test crashes (Requested by smfr on
2257         #webkit).
2258
2259         * css/CSSSelector.cpp:
2260         (WebCore::CSSSelector::pseudoId):
2261         (WebCore::nameToPseudoTypeMap):
2262         (WebCore::CSSSelector::extractPseudoType):
2263         * css/CSSSelector.h:
2264         * html/HTMLProgressElement.cpp:
2265         (WebCore::HTMLProgressElement::parseMappedAttribute):
2266         (WebCore::HTMLProgressElement::attach):
2267         * html/HTMLProgressElement.h:
2268         * rendering/RenderProgress.cpp:
2269         (WebCore::RenderProgress::~RenderProgress):
2270         (WebCore::RenderProgress::updateFromElement):
2271         (WebCore::RenderProgress::layoutParts):
2272         (WebCore::RenderProgress::shouldHaveParts):
2273         * rendering/RenderProgress.h:
2274         * rendering/style/RenderStyleConstants.h:
2275
2276 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2277
2278         Reviewed by Sam Weinig.
2279
2280         Enhance ShadowBlur to render inset box shadows
2281         https://bugs.webkit.org/show_bug.cgi?id=51567
2282         
2283         Use ShadowBlur for inset box-shadows with CG. It 
2284         currently lacks a tiled version, but is still much
2285         faster than CG shadows.
2286
2287         Test: fast/box-shadow/inset-box-shadow-radius.html
2288
2289         * platform/graphics/ShadowBlur.cpp:
2290         * platform/graphics/ShadowBlur.h: New method for inset
2291         shadows.
2292         (WebCore::ShadowBlur::drawInsetShadow): 
2293
2294         * platform/graphics/GraphicsContext.cpp: #ifdef out
2295         fillRectWithRoundedHole() for CG.
2296
2297         * platform/graphics/cg/GraphicsContextCG.cpp:
2298         (WebCore::GraphicsContext::fillRectWithRoundedHole): If there's
2299         a shadow with a radius > 0, use ShadowBlur.
2300
2301 2011-01-28  Kenneth Russell  <kbr@google.com>
2302
2303         Reviewed by Chris Marrin.
2304
2305         WebGL shows PNG Textures with indexed colors too dark
2306         https://bugs.webkit.org/show_bug.cgi?id=47477
2307
2308         Properly handle indexed PNG images by re-rendering them as RGBA
2309         images before upload. Verified with this layout test and the test
2310         cases from bugs 47477 and 53269.
2311
2312         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2313         (WebCore::GraphicsContext3D::getImageData):
2314
2315 2011-01-27  MORITA Hajime  <morrita@google.com>
2316
2317         Reviewed by Dimitri Glazkov.
2318         
2319         Convert <progress> shadow DOM to a DOM-based shadow.
2320         https://bugs.webkit.org/show_bug.cgi?id=50660
2321
2322         * Removed RenderProgress::m_valuePart, moved the shadow node
2323           to the shadow root of HTMLProgressElement.
2324         * Removed hard-coded pseudo ID for -webkit-progress-bar-value.
2325           ProgressBarValueElement is defined only for overriding
2326           shadowPseudoId().
2327         
2328         No new tests. No behavioral change.
2329
2330         * css/CSSSelector.cpp:
2331         (WebCore::CSSSelector::pseudoId):
2332         (WebCore::nameToPseudoTypeMap):
2333         (WebCore::CSSSelector::extractPseudoType):
2334         * css/CSSSelector.h:
2335         * html/HTMLProgressElement.cpp:
2336         (WebCore::ProgressBarValueElement::ProgressBarValueElement):
2337         (WebCore::ProgressBarValueElement::shadowPseudoId):
2338         (WebCore::ProgressBarValueElement::create):
2339         (WebCore::HTMLProgressElement::parseMappedAttribute):
2340         (WebCore::HTMLProgressElement::attach):
2341         (WebCore::HTMLProgressElement::valuePart):
2342         (WebCore::HTMLProgressElement::didElementStateChange):
2343         (WebCore::HTMLProgressElement::createShadowSubtreeIfNeeded):
2344         * html/HTMLProgressElement.h:
2345         * rendering/RenderProgress.cpp:
2346         (WebCore::RenderProgress::~RenderProgress):
2347         (WebCore::RenderProgress::updateFromElement):
2348         (WebCore::RenderProgress::layoutParts):
2349         (WebCore::RenderProgress::shouldHaveParts):
2350         (WebCore::RenderProgress::valuePart):
2351         * rendering/RenderProgress.h:
2352         * rendering/style/RenderStyleConstants.h:
2353
2354 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2355
2356         Reviewed by Ariya Hidayat.
2357
2358         Enhance ShadowBlur to render inset box shadows; Part 1.
2359         https://bugs.webkit.org/show_bug.cgi?id=51567
2360         
2361         Add a new method to GraphicsContext to render a rect with a rounded hole,
2362         for use by inset box-shadow code. Knowledge that we're rendering a rounded
2363         hole will enable ShadowBlur to be used here in future.
2364
2365         * platform/graphics/GraphicsContext.cpp:
2366         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2367         * platform/graphics/GraphicsContext.h:
2368         * rendering/RenderBoxModelObject.cpp:
2369         (WebCore::RenderBoxModelObject::paintBoxShadow):
2370
2371 2011-01-23  MORITA Hajime  <morrita@google.com>
2372
2373         Reviewed by Eric Seidel.
2374
2375         REGRESSION: Inset shadow with too large border radius misses rounded corner.
2376         https://bugs.webkit.org/show_bug.cgi?id=52800
2377
2378         The refactoring on r76083 broke the invariant between border
2379         IntRect and its radii because RoundedIntRect::setRect() is called
2380         after getRoundedInnerBorderWithBorderWidths(), which enforces the
2381         invariant. Th rounded-rect clipping code verifies the invariant,
2382         and discard the invalid radii, that results broken paintings.
2383         
2384         This change moved setRect() before
2385         getRoundedInnerBorderWithBorderWidths() not to modify the valid
2386         RoundedIntRect value.
2387         
2388         Test: fast/box-shadow/inset-with-extraordinary-radii-and-border.html
2389
2390         * rendering/RenderBoxModelObject.cpp:
2391         (WebCore::RenderBoxModelObject::paintBoxShadow):
2392
2393 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2394
2395         Attempt to fix Windows build by adding ShadowBlur.cpp/h to the
2396         vcproj.
2397
2398         * WebCore.vcproj/WebCore.vcproj:
2399
2400 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2401
2402         Reviewed by Dan Bernstein.
2403
2404         -webkit-box-shadow causes awful scroll/resize/redraw performance
2405         https://bugs.webkit.org/show_bug.cgi?id=22102
2406         
2407         Use ShadowBlur for CG, whe rendering shadows on rects and
2408         rounded rects outside of canvas.
2409         
2410         CG shadows with a radius of more than 8px do not render
2411         correctly. We preserve this incorrect rendering by compensating
2412         for it when rending -webkit-box-shadow. Calls that should use
2413         this deprecated radius behavior now use setLegacyShadow().
2414
2415         Test: fast/box-shadow/box-shadow-transformed.html
2416         
2417         * html/canvas/CanvasRenderingContext2D.cpp: Use setLegacyShadow()
2418         for canvas, to indicate that it should use the deprecated radius
2419         behavior.
2420         (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault): Ditto.
2421         (WebCore::CanvasRenderingContext2D::setShadow): Ditto.
2422         (WebCore::CanvasRenderingContext2D::applyShadow): Ditto.
2423         
2424         * platform/graphics/GraphicsContext.cpp:
2425         (WebCore::GraphicsContext::setLegacyShadow): Set the m_state.shadowsUseLegacyRadius bit.
2426         
2427         * platform/graphics/GraphicsContext.h:
2428         (WebCore::GraphicsContextState::GraphicsContextState): Add a 
2429         shadowsUseLegacyRadius bit to the state.
2430         
2431         * platform/graphics/cg/GraphicsContextCG.cpp:
2432         (WebCore::radiusToLegacyRadius): Map from the actual radius to one
2433         that approximates CG behavior.
2434         (WebCore::hasBlurredShadow): Helper that returns true if we have a shadow
2435         with a non-zero blur radius.
2436         (WebCore::GraphicsContext::fillRect): Use ShadowBlur if not canvas.
2437         (WebCore::GraphicsContext::fillRoundedRect): Ditto.
2438         (WebCore::GraphicsContext::setPlatformShadow): Comment.
2439
2440         * rendering/RenderBoxModelObject.cpp:
2441         (WebCore::RenderBoxModelObject::paintBoxShadow): Call setLegacyShadow()
2442         for -webkit-box-shadow.
2443
2444         * platform/graphics/ShadowBlur.cpp: 
2445         (WebCore::ShadowBlur::calculateLayerBoundingRect): Fix some pixel crack issues
2446         by rounding up the blur radius.
2447         (WebCore::ShadowBlur::drawRectShadow): Ditto
2448         (WebCore::ShadowBlur::drawRectShadowWithTiling): Ditto.
2449
2450 2011-01-30  Oliver Hunt  <oliver@apple.com>
2451
2452         Try to fix Qt build (again).
2453
2454         * bridge/qt/qt_runtime.cpp:
2455         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
2456         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
2457
2458 2011-01-30  Oliver Hunt  <oliver@apple.com>
2459
2460         Try to fix Qt build.
2461
2462         * bridge/qt/qt_instance.cpp:
2463         (JSC::Bindings::QtInstance::QtInstance):
2464         (JSC::Bindings::QtInstance::removeCachedMethod):
2465         (JSC::Bindings::QtInstance::markAggregate):
2466         * bridge/qt/qt_instance.h:
2467
2468 2011-01-30  Oliver Hunt  <oliver@apple.com>
2469
2470         Convert markstack to a slot visitor API
2471         https://bugs.webkit.org/show_bug.cgi?id=53219
2472
2473         rolling r77006 and r77020 back in.
2474
2475         * ForwardingHeaders/runtime/WriteBarrier.h: Added.
2476         * WebCore.exp.in:
2477         * bindings/js/DOMWrapperWorld.h:
2478         (WebCore::DOMWrapperWorld::globalData):
2479         * bindings/js/JSAudioConstructor.cpp:
2480         (WebCore::JSAudioConstructor::JSAudioConstructor):
2481         * bindings/js/JSDOMBinding.cpp:
2482         (WebCore::markDOMNodesForDocument):
2483         (WebCore::markDOMObjectWrapper):
2484         (WebCore::markDOMNodeWrapper):
2485         * bindings/js/JSDOMGlobalObject.cpp:
2486         (WebCore::JSDOMGlobalObject::markChildren):
2487         (WebCore::JSDOMGlobalObject::setInjectedScript):
2488         (WebCore::JSDOMGlobalObject::injectedScript):
2489         * bindings/js/JSDOMGlobalObject.h:
2490         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
2491         (WebCore::getDOMConstructor):
2492         * bindings/js/JSDOMWindowCustom.cpp:
2493         (WebCore::JSDOMWindow::setLocation):
2494         (WebCore::DialogHandler::dialogCreated):
2495         * bindings/js/JSDOMWindowShell.cpp:
2496         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
2497         (WebCore::JSDOMWindowShell::setWindow):
2498         (WebCore::JSDOMWindowShell::markChildren):
2499         (WebCore::JSDOMWindowShell::unwrappedObject):
2500         * bindings/js/JSDOMWindowShell.h:
2501         (WebCore::JSDOMWindowShell::window):
2502         (WebCore::JSDOMWindowShell::setWindow):
2503         * bindings/js/JSDeviceMotionEventCustom.cpp:
2504         (WebCore::createAccelerationObject):
2505         (WebCore::createRotationRateObject):
2506         * bindings/js/JSEventListener.cpp:
2507         (WebCore::JSEventListener::JSEventListener):
2508         (WebCore::JSEventListener::markJSFunction):
2509         * bindings/js/JSEventListener.h:
2510         (WebCore::JSEventListener::jsFunction):
2511         * bindings/js/JSHTMLDocumentCustom.cpp:
2512         (WebCore::JSHTMLDocument::setAll):
2513         * bindings/js/JSImageConstructor.cpp:
2514         (WebCore::JSImageConstructor::JSImageConstructor):
2515         * bindings/js/JSImageDataCustom.cpp:
2516         (WebCore::toJS):
2517         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2518         (WebCore::JSJavaScriptCallFrame::scopeChain):
2519         (WebCore::JSJavaScriptCallFrame::scopeType):
2520         * bindings/js/JSNodeFilterCondition.cpp:
2521         (WebCore::JSNodeFilterCondition::markAggregate):
2522         (WebCore::JSNodeFilterCondition::acceptNode):
2523         * bindings/js/JSNodeFilterCondition.h:
2524         * bindings/js/JSNodeFilterCustom.cpp:
2525         * bindings/js/JSOptionConstructor.cpp:
2526         (WebCore::JSOptionConstructor::JSOptionConstructor):
2527         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2528         (WebCore::JSSQLResultSetRowList::item):
2529         * bindings/js/ScriptCachedFrameData.cpp:
2530         (WebCore::ScriptCachedFrameData::restore):
2531         * bindings/js/ScriptObject.cpp:
2532         (WebCore::ScriptGlobalObject::set):
2533         * bindings/js/SerializedScriptValue.cpp:
2534         (WebCore::CloneDeserializer::putProperty):
2535         * bindings/scripts/CodeGeneratorJS.pm:
2536         * bridge/qt/qt_runtime.cpp:
2537         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
2538         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
2539         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
2540         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
2541         * bridge/qt/qt_runtime.h:
2542         * bridge/runtime_root.cpp:
2543         (JSC::Bindings::RootObject::invalidate):
2544         * bridge/runtime_root.h:
2545         * dom/Document.h:
2546
2547 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2548
2549         Reviewed by Sam Weinig.
2550
2551         Make ContextShadow code cross-platform
2552         https://bugs.webkit.org/show_bug.cgi?id=51312
2553
2554         Add a new class, ShadowBlur, that contains most of the
2555         code from ContextShadow, but is fully cross-platform.
2556         It depends on one new method, GraphicsContext::clipBounds(),
2557         which platforms will have to implement.
2558         
2559         Add ShadowBlur to the Mac Xcode project, but don't use it
2560         anywhere yet.
2561
2562         * WebCore.xcodeproj/project.pbxproj:
2563         * platform/graphics/GraphicsContext.cpp:
2564         (WebCore::GraphicsContext::clipBounds):
2565         * platform/graphics/GraphicsContext.h:
2566         * platform/graphics/ShadowBlur.cpp: Added.
2567         (WebCore::roundUpToMultipleOf32):
2568         (WebCore::ScratchBuffer::ScratchBuffer):
2569         (WebCore::ScratchBuffer::getScratchBuffer):
2570         (WebCore::ScratchBuffer::scheduleScratchBufferPurge):
2571         (WebCore::ScratchBuffer::timerFired):
2572         (WebCore::ScratchBuffer::clearScratchBuffer):
2573         (WebCore::ScratchBuffer::shared):
2574         (WebCore::ShadowBlur::ShadowBlur):
2575         (WebCore::ShadowBlur::blurLayerImage):
2576         (WebCore::ShadowBlur::adjustBlurDistance):
2577         (WebCore::ShadowBlur::calculateLayerBoundingRect):
2578         (WebCore::ShadowBlur::beginShadowLayer):
2579         (WebCore::ShadowBlur::endShadowLayer):
2580         (WebCore::ShadowBlur::drawRectShadow):
2581         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
2582         (WebCore::ShadowBlur::drawRectShadowWithTiling):
2583         (WebCore::ShadowBlur::clipBounds):
2584         * platform/graphics/ShadowBlur.h: Added.
2585         (WebCore::ShadowBlur::setShadowsIgnoreTransforms):
2586         (WebCore::ShadowBlur::shadowsIgnoreTransforms):
2587         * platform/graphics/cg/GraphicsContextCG.cpp:
2588         (WebCore::GraphicsContext::clipBounds):
2589
2590 2011-01-29  Simon Fraser  <simon.fraser@apple.com>
2591
2592         Reviewed by Dan Bernstein.
2593
2594         CSS3 gradients with em-based stops fail to repaint when font size changes
2595         https://bugs.webkit.org/show_bug.cgi?id=51845
2596         
2597         Mark as uncacheable gradidients whose color stops depend on font size,
2598         and don't attempt to put these into CSSImageGeneratorValue's image cache.
2599         This means we return a new gradient each time, which is fairly cheap, and
2600         fixes repaint issues under changing font size.
2601
2602         Test: fast/repaint/gradients-em-stops-repaint.html
2603
2604         * css/CSSGradientValue.cpp:
2605         (WebCore::CSSGradientValue::image):
2606         (WebCore::CSSGradientValue::isCacheable):
2607         * css/CSSGradientValue.h:
2608
2609 2011-01-29  Geoffrey Garen  <ggaren@apple.com>
2610
2611         Undo try to fix the Qt build.
2612         
2613         My guess didn't work.
2614
2615         * WebCore.pro:
2616
2617 2011-01-29  Geoffrey Garen  <ggaren@apple.com>
2618
2619         Try to fix the Qt build.
2620
2621         * WebCore.pro: Added platform/text/CharacterNames.h.
2622
2623 2011-01-28  Geoffrey Garen  <ggaren@apple.com>
2624
2625         Reviewed by Maciej Stachowiak.
2626
2627         Some more Heap cleanup.
2628         https://bugs.webkit.org/show_bug.cgi?id=53357
2629         
2630         Updated for JavaScriptCore changes.
2631
2632         * bindings/js/ScriptGCEvent.cpp:
2633         (WebCore::ScriptGCEvent::getHeapSize):
2634
2635 2011-01-29  Adam Barth  <abarth@webkit.org>
2636
2637         Reviewed by Daniel Bates.
2638
2639         Fix XSSFilter crash when extracting the source for a token twice
2640         https://bugs.webkit.org/show_bug.cgi?id=53368
2641
2642         Previously, it was unsafe to extract the source for the same token
2643         twice because the HTMLSourceTracker would advance its internal
2644         representation of the SegmentedString.  This patch introduces a cache
2645         to make calling HTMLSourceTracker::sourceForToken multiple times safe.
2646
2647         * html/parser/HTMLSourceTracker.cpp:
2648         (WebCore::HTMLSourceTracker::end):
2649         (WebCore::HTMLSourceTracker::sourceForToken):
2650         * html/parser/HTMLSourceTracker.h:
2651
2652 2011-01-29  Maciej Stachowiak  <mjs@apple.com>
2653
2654         Reviewed by Dan Bernstein.
2655
2656         Fix fat build for both 32-bit and 64-bit under llvm-gcc 4.2
2657         https://bugs.webkit.org/show_bug.cgi?id=53386
2658
2659         * platform/mac/ScrollAnimatorMac.mm:
2660         (WebCore::elasticDeltaForReboundDelta):
2661         (WebCore::scrollWheelMultiplier):
2662         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
2663         (WebCore::ScrollAnimatorMac::beginScrollGesture):
2664         (WebCore::roundTowardZero):
2665         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2666
2667 2011-01-29  Daniel Bates  <dbates@rim.com>
2668
2669         Reviewed by Maciej Stachowiak.
2670
2671         Remove reference to ${CMAKE_SOURCE_DIR}/Source in CMake files
2672         https://bugs.webkit.org/show_bug.cgi?id=53382
2673
2674         Our file system hierarchy ensures that CMAKE_SOURCE_DIR is defined to be /Source.
2675         So, ${CMAKE_SOURCE_DIR}/Source evaluates to the non-existent directory /Source/Source.
2676         Therefore, we should remove such references.
2677
2678         * CMakeLists.txt:
2679
2680 2011-01-29  Sam Weinig  <sam@webkit.org>
2681
2682         Reviewed by Jon Honeycutt.
2683
2684         Fix 32-bit build on the Mac.
2685
2686         * platform/mac/ScrollAnimatorMac.mm:
2687         (WebCore::roundTowardZero):
2688         (WebCore::roundToDevicePixelTowardZero):
2689         Use floats instead of doubles to avoid double-to-float conversion
2690         issues.
2691
2692 2011-01-29  Simon Fraser  <simon.fraser@apple.com>
2693
2694         Reviewed by Adam Barth.
2695
2696         Use clampToInteger() functions in a few places
2697         https://bugs.webkit.org/show_bug.cgi?id=53363
2698         
2699         * css/CSSStyleSelector.cpp:
2700         (WebCore::CSSStyleSelector::applyProperty): Use clampToInteger() for z-index.
2701         (WebCore::CSSStyleSelector::createTransformOperations): Use clampToPositiveInteger().
2702         * platform/graphics/transforms/PerspectiveTransformOperation.cpp: Ditto.
2703         (WebCore::PerspectiveTransformOperation::blend): Ditto.
2704
2705 2011-01-29  Patrick Gansterer  <paroga@webkit.org>
2706
2707         Reviewed by David Kilzer.
2708
2709         Move CharacterNames.h into WTF directory
2710         https://bugs.webkit.org/show_bug.cgi?id=49618
2711
2712         * ForwardingHeaders/wtf/unicode/CharacterNames.h: Added.
2713         * GNUmakefile.am:
2714         * WebCore.gypi:
2715         * WebCore.vcproj/WebCore.vcproj:
2716         * WebCore.xcodeproj/project.pbxproj:
2717         * accessibility/AccessibilityObject.cpp:
2718         * accessibility/AccessibilityRenderObject.cpp:
2719         * bindings/cpp/WebDOMHTMLDocumentCustom.cpp:
2720         * bindings/js/JSHTMLDocumentCustom.cpp:
2721         * dom/Position.cpp:
2722         * dom/SelectElement.cpp:
2723         * editing/CompositeEditCommand.cpp:
2724         * editing/Editor.cpp:
2725         * editing/HTMLInterchange.cpp:
2726         * editing/InsertTextCommand.cpp:
2727         * editing/MarkupAccumulator.cpp:
2728         * editing/TextIterator.cpp:
2729         * editing/VisibleSelection.cpp:
2730         * editing/htmlediting.cpp:
2731         * editing/htmlediting.h:
2732         * editing/markup.cpp:
2733         * html/FTPDirectoryDocument.cpp:
2734         * html/HTMLFormControlElement.cpp:
2735         * html/parser/HTMLTreeBuilder.cpp:
2736         * loader/appcache/ManifestParser.cpp:
2737         * platform/chromium/PopupMenuChromium.cpp:
2738         * platform/graphics/Font.h:
2739         * platform/graphics/FontFastPath.cpp:
2740         * platform/graphics/GlyphPageTreeNode.cpp:
2741         * platform/graphics/StringTruncator.cpp:
2742         * platform/graphics/mac/ComplexTextController.cpp:
2743         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
2744         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2745         * platform/mac/PasteboardMac.mm:
2746         * platform/text/TextCodecICU.cpp:
2747         * platform/text/mac/TextCodecMac.cpp:
2748         * platform/text/transcoder/FontTranscoder.cpp:
2749         * rendering/RenderBlockLineLayout.cpp:
2750         * rendering/RenderFlexibleBox.cpp:
2751         * rendering/RenderListMarker.cpp:
2752         * rendering/RenderText.cpp:
2753         * rendering/RenderTextControl.cpp:
2754         * rendering/RenderTreeAsText.cpp:
2755         * rendering/break_lines.cpp:
2756         * rendering/mathml/RenderMathMLOperator.h:
2757         * websockets/WebSocketHandshake.cpp:
2758         * wml/WMLTableElement.cpp:
2759
2760 2011-01-29  Dan Winship  <danw@gnome.org>
2761
2762         Reviewed by Xan Lopez.
2763
2764         [GTK] Remove HAVE_LIBSOUP_2_29_90 conditionals; we depend on
2765         libsoup 2.33.1 now.
2766         https://bugs.webkit.org/show_bug.cgi?id=50675
2767
2768         * platform/network/soup/CookieJarSoup.cpp:
2769         (WebCore::defaultCookieJar):
2770         (WebCore::setCookies):
2771         * platform/network/soup/ResourceHandleSoup.cpp:
2772         (WebCore::ResourceHandle::prepareForURL):
2773         (WebCore::restartedCallback):
2774         (WebCore::startHttp):
2775         * platform/network/soup/ResourceRequestSoup.cpp:
2776         (WebCore::ResourceRequest::updateSoupMessage):
2777         (WebCore::ResourceRequest::toSoupMessage):
2778         (WebCore::ResourceRequest::updateFromSoupMessage):
2779
2780 2011-01-29  Adam Barth  <abarth@webkit.org>
2781
2782         Reviewed by Daniel Bates.
2783
2784         XSSFilter should replace URLs with about:blank instead of the empty string
2785         https://bugs.webkit.org/show_bug.cgi?id=53370
2786
2787         Using the empty string will make the URL complete to the current
2788         document's URL, which isn't really what we want.  Instead, we want to
2789         use about:blank, which is safe.
2790
2791         * html/parser/XSSFilter.cpp:
2792         (WebCore::XSSFilter::filterObjectToken):
2793         (WebCore::XSSFilter::filterEmbedToken):
2794
2795 2011-01-29  Adam Barth  <abarth@webkit.org>
2796
2797         Reviewed by Daniel Bates.
2798
2799         XSSFilter should pass xssAuditor/script-tag-addslashes*
2800         https://bugs.webkit.org/show_bug.cgi?id=53365
2801
2802         We need to canonicalize strings to avoid being tricked by addslashes.
2803
2804         * html/parser/XSSFilter.cpp:
2805         (WebCore::HTMLNames::isNonCanonicalCharacter):
2806             - This function is copied from the XSSAuditor (with some tweaks).
2807               We'll eventually remove the XSSAuditor once we've got XSSFilter
2808               working properly.
2809         (WebCore::HTMLNames::canonicalize):
2810         (WebCore::HTMLNames::decodeURL):
2811         (WebCore::XSSFilter::isContainedInRequest):
2812
2813 2011-01-29  Adam Barth  <abarth@webkit.org>
2814
2815         Reviewed by Daniel Bates.
2816
2817         XSSFilter should pass xssAuditor/script-tag-with-source-same-host.html
2818         and xssAuditor/script-tag-post-*
2819         https://bugs.webkit.org/show_bug.cgi?id=53364
2820
2821         We're supposed to allow loading same-origin resources even if they
2822         appear as part of the request.
2823
2824         Also, we're supposed to look at the POST data too.  :)
2825
2826         * html/parser/XSSFilter.cpp:
2827         (WebCore::XSSFilter::eraseAttributeIfInjected):
2828         (WebCore::XSSFilter::isSameOriginResource):
2829             - Copy/paste from XSSAuditor::isSameOriginResource.  We'll
2830               eventually remove the XSSAuditor version when XSSFilter is done.
2831         * html/parser/XSSFilter.h:
2832
2833 2011-01-29  Adam Barth  <abarth@webkit.org>
2834
2835         Reviewed by Daniel Bates.
2836
2837         XSSFilter should pass 16 of the xssAuditor/script-tag* tests
2838         https://bugs.webkit.org/show_bug.cgi?id=53362
2839
2840         Turns out we need to replace the src attribute of script tags with
2841         about:blank to avoid loading the main document URL as a script.  Also,
2842         move misplaced return statement that was triggering the console message
2843         too often.
2844
2845         * html/parser/HTMLToken.h:
2846         (WebCore::HTMLToken::appendToAttributeValue):
2847         * html/parser/XSSFilter.cpp:
2848         (WebCore::XSSFilter::filterScriptToken):
2849         (WebCore::XSSFilter::eraseAttributeIfInjected):
2850         * html/parser/XSSFilter.h:
2851
2852 2011-01-28  Jon Honeycutt  <jhoneycutt@apple.com>
2853
2854         Downloads in WK2 on Windows should write resume data to bundle
2855         https://bugs.webkit.org/show_bug.cgi?id=53282
2856         <rdar://problem/8753077>
2857
2858         Reviewed by Alice Liu.
2859
2860         * WebCore.vcproj/WebCore.vcproj:
2861         Added new files to project.
2862
2863         * platform/network/cf/DownloadBundle.h: Added.
2864         * platform/network/win/DownloadBundleWin.cpp: Added.
2865         (WebCore::DownloadBundle::magicNumber):
2866         Moved from WebKit's WebDownload so that WebKit and WebKit2 can share
2867         it.
2868         (WebCore::DownloadBundle::fileExtension):
2869         Ditto.
2870         (WebCore::DownloadBundle::appendResumeData):
2871         Ditto - but modified to return bool rather than HRESULT and to clean up
2872         whitespace.
2873         (WebCore::DownloadBundle::extractResumeData):
2874         Ditto - modified to clean up whitespace.
2875
2876 2011-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2877
2878         Unreviewed, rolling out r77050.
2879         http://trac.webkit.org/changeset/77050
2880         https://bugs.webkit.org/show_bug.cgi?id=53371
2881
2882         Caused a crash in Chromium's test_shell_tests (Requested by
2883         rniwa on #webkit).
2884
2885         * html/parser/HTMLTreeBuilder.cpp:
2886         (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
2887         (WebCore::HTMLTreeBuilder::FragmentParsingContext::document):
2888         (WebCore::HTMLTreeBuilder::FragmentParsingContext::finished):
2889         * html/parser/HTMLTreeBuilder.h:
2890
2891 2011-01-28  Eric Seidel  <eric@webkit.org>
2892
2893         Reviewed by Darin Adler.
2894
2895         HTML5 TreeBuilder regressed a Peacekeeper DOM test by 40%
2896         https://bugs.webkit.org/show_bug.cgi?id=48719
2897
2898         It's unclear exactly what the Peacekeeper benchmark is testing,
2899         because I haven't found a way to run it myself.
2900
2901         However, I constructed a benchmark which shows at least one possible slow point.
2902         The HTML5 spec talks about creating a new document for every time we use
2903         the fragment parsing algorithm.  Document() it turns out, it a huge bloated
2904         mess, and the constructor and destructor do a huge amount of work.
2905         To avoid constructing (or destructing) documents for each innerHTML call,
2906         this patch adds a shared dummy document used by all innerHTML calls.
2907
2908         This patch brings us from 7x slower than Safari 5 on tiny-innerHTML
2909         to only 1.5x slower than Safari 5.  I'm sure there is more work to do here.
2910
2911         Saving a shared Document like this is error prone.  Currently
2912         DummyDocumentFactory::releaseDocument() calls removeAllChildren()
2913         in an attempt to clear the Document's state. However it's possible
2914         that that call is not sufficient and we'll have future bugs here.
2915
2916         * html/parser/HTMLTreeBuilder.cpp:
2917         (WebCore::DummyDocumentFactory::createDummyDocument):
2918         (WebCore::DummyDocumentFactory::releaseDocument):
2919         (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
2920         (WebCore::HTMLTreeBuilder::FragmentParsingContext::document):
2921         (WebCore::HTMLTreeBuilder::FragmentParsingContext::finished):
2922         * html/parser/HTMLTreeBuilder.h:
2923
2924 2011-01-28  Johnny Ding  <jnd@chromium.org>
2925
2926         Reviewed by Adam Barth.
2927
2928         Gesture API: Don't use current gesture status to set "forceUserGesture" parameter when calling ScriptController::executeScript.
2929         The "forceUserGesture" parameter should be only set when you are definitely sure that the running script is from a hyper-link.
2930         https://bugs.webkit.org/show_bug.cgi?id=53244
2931
2932         Test: fast/events/popup-blocked-from-iframe-src.html
2933
2934         * bindings/ScriptControllerBase.cpp:
2935         (WebCore::ScriptController::executeIfJavaScriptURL):
2936
2937 2011-01-28  Simon Fraser  <simon.fraser@apple.com>
2938
2939         Reviewed by Gavin Barraclough.
2940
2941         Add various clampToInt() methods to MathExtras.h
2942         https://bugs.webkit.org/show_bug.cgi?id=52910
2943
2944         Use clampToInteger() from MathExtras.h
2945
2946         * css/CSSParser.cpp:
2947         (WebCore::CSSParser::parseCounter):
2948
2949 2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2950
2951         Unreviewed, rolling out r77006 and r77020.
2952         http://trac.webkit.org/changeset/77006
2953         http://trac.webkit.org/changeset/77020
2954         https://bugs.webkit.org/show_bug.cgi?id=53360
2955
2956         "Broke Windows tests" (Requested by rniwa on #webkit).
2957
2958         * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
2959         * WebCore.exp.in:
2960         * bindings/js/DOMWrapperWorld.h:
2961         * bindings/js/JSAudioConstructor.cpp:
2962         (WebCore::JSAudioConstructor::JSAudioConstructor):
2963         * bindings/js/JSDOMBinding.cpp:
2964         (WebCore::markDOMNodesForDocument):
2965         (WebCore::markDOMObjectWrapper):
2966         (WebCore::markDOMNodeWrapper):
2967         * bindings/js/JSDOMGlobalObject.cpp:
2968         (WebCore::JSDOMGlobalObject::markChildren):
2969         (WebCore::JSDOMGlobalObject::setInjectedScript):
2970         (WebCore::JSDOMGlobalObject::injectedScript):
2971         * bindings/js/JSDOMGlobalObject.h:
2972         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
2973         (WebCore::getDOMConstructor):
2974         * bindings/js/JSDOMWindowCustom.cpp:
2975         (WebCore::JSDOMWindow::setLocation):
2976         (WebCore::DialogHandler::dialogCreated):
2977         * bindings/js/JSDOMWindowShell.cpp:
2978         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
2979         (WebCore::JSDOMWindowShell::setWindow):
2980         (WebCore::JSDOMWindowShell::markChildren):
2981         (WebCore::JSDOMWindowShell::unwrappedObject):
2982         * bindings/js/JSDOMWindowShell.h:
2983         (WebCore::JSDOMWindowShell::window):
2984         (WebCore::JSDOMWindowShell::setWindow):
2985         * bindings/js/JSDeviceMotionEventCustom.cpp:
2986         (WebCore::createAccelerationObject):
2987         (WebCore::createRotationRateObject):
2988         * bindings/js/JSEventListener.cpp:
2989         (WebCore::JSEventListener::JSEventListener):
2990         (WebCore::JSEventListener::markJSFunction):
2991         * bindings/js/JSEventListener.h:
2992         (WebCore::JSEventListener::jsFunction):
2993         * bindings/js/JSHTMLDocumentCustom.cpp:
2994         (WebCore::JSHTMLDocument::setAll):
2995         * bindings/js/JSImageConstructor.cpp:
2996         (WebCore::JSImageConstructor::JSImageConstructor):
2997         * bindings/js/JSImageDataCustom.cpp:
2998         (WebCore::toJS):
2999         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
3000         (WebCore::JSJavaScriptCallFrame::scopeChain):
3001         (WebCore::JSJavaScriptCallFrame::scopeType):
3002         * bindings/js/JSNodeFilterCondition.cpp:
3003         (WebCore::JSNodeFilterCondition::markAggregate):
3004         (WebCore::JSNodeFilterCondition::acceptNode):
3005         * bindings/js/JSNodeFilterCondition.h:
3006         * bindings/js/JSNodeFilterCustom.cpp:
3007         * bindings/js/JSOptionConstructor.cpp:
3008         (WebCore::JSOptionConstructor::JSOptionConstructor):
3009         * bindings/js/JSSQLResultSetRowListCustom.cpp:
3010         (WebCore::JSSQLResultSetRowList::item):
3011         * bindings/js/ScriptCachedFrameData.cpp:
3012         (WebCore::ScriptCachedFrameData::restore):
3013         * bindings/js/ScriptObject.cpp:
3014         (WebCore::ScriptGlobalObject::set):
3015         * bindings/js/SerializedScriptValue.cpp:
3016         (WebCore::CloneDeserializer::putProperty):
3017         * bindings/scripts/CodeGeneratorJS.pm:
3018         * bridge/qt/qt_runtime.cpp:
3019         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
3020         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
3021         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
3022         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
3023         * bridge/qt/qt_runtime.h:
3024         * bridge/runtime_root.cpp:
3025         (JSC::Bindings::RootObject::invalidate):
3026         * bridge/runtime_root.h:
3027         * dom/Document.h:
3028
3029 2011-01-28  Adam Barth  <abarth@webkit.org>
3030
3031         Reviewed by Eric Seidel.
3032
3033         XSSFilter should log to the console when it blocks something
3034         https://bugs.webkit.org/show_bug.cgi?id=53354
3035
3036         This patch refactors a bunch of methods in XSSFilter to return a bool
3037         indicating whether they blocked anything.  Using this bool, we decide
3038         whether to log to the console.  We're using the same log message as the
3039         XSSAuditor, but it seems likely we can improve this message in the
3040         future (especially by piping in the correct line number, which is now
3041         accessible via the parser).
3042
3043         * html/parser/XSSFilter.cpp:
3044         (WebCore::HTMLNames::isNameOfInlineEventHandler):
3045         (WebCore::XSSFilter::filterToken):
3046         (WebCore::XSSFilter::filterTokenInitial):
3047         (WebCore::XSSFilter::filterTokenAfterScriptStartTag):
3048         (WebCore::XSSFilter::filterScriptToken):
3049         (WebCore::XSSFilter::filterObjectToken):
3050         (WebCore::XSSFilter::filterEmbedToken):
3051         (WebCore::XSSFilter::filterAppletToken):
3052         (WebCore::XSSFilter::filterMetaToken):
3053         (WebCore::XSSFilter::filterBaseToken):
3054         (WebCore::XSSFilter::eraseInlineEventHandlersIfInjected):
3055         * html/parser/XSSFilter.h:
3056
3057 2011-01-28  Adam Barth  <abarth@webkit.org>
3058
3059         Reviewed by Daniel Bates.
3060
3061         Wire up settings->xssAuditorEnabled to XSSFilter
3062         https://bugs.webkit.org/show_bug.cgi?id=53345
3063
3064         * html/parser/XSSFilter.cpp:
3065         (WebCore::XSSFilter::XSSFilter):
3066         (WebCore::XSSFilter::filterToken):
3067         * html/parser/XSSFilter.h:
3068
3069 2011-01-28  Adam Barth  <abarth@webkit.org>
3070
3071         Reviewed by Daniel Bates.
3072
3073         Teach XSSFilter about <meta> and <base> tags
3074         https://bugs.webkit.org/show_bug.cgi?id=53339
3075
3076         I'm not 100% sure we need to block <meta http-equiv>, but it seems
3077         prudent given how powerful that attribute is.  We definitely need to
3078         block injection of <base href> because that can redirect script tags
3079         that use relative URLs.
3080
3081         * html/parser/XSSFilter.cpp:
3082         (WebCore::XSSFilter::filterToken):
3083         (WebCore::XSSFilter::filterMetaToken):
3084         (WebCore::XSSFilter::filterBaseToken):
3085         * html/parser/XSSFilter.h:
3086
3087 2011-01-28  Adam Barth  <abarth@webkit.org>
3088
3089         Reviewed by Daniel Bates.
3090
3091         Teach XSSFilter about <applet>
3092         https://bugs.webkit.org/show_bug.cgi?id=53338
3093
3094         HTML5 is pretty light on information about how the <applet> tag works.
3095         According to this site:
3096
3097         http://download.oracle.com/javase/1.4.2/docs/guide/misc/applet.html
3098
3099         The "code" and "object" attributes are the essential attributes for
3100         determining which piece of Java to run.  We might need to expand to the
3101         codebase and archive attributes at some point, but hopefully code and
3102         object will be sufficient.
3103
3104         * html/parser/XSSFilter.cpp:
3105         (WebCore::XSSFilter::filterToken):
3106         (WebCore::XSSFilter::filterAppletToken):
3107         * html/parser/XSSFilter.h:
3108
3109 2011-01-28  Adam Barth  <abarth@webkit.org>
3110
3111         Reviewed by Daniel Bates.
3112
3113         Teach the XSSFilter about object and embed tags
3114         https://bugs.webkit.org/show_bug.cgi?id=53336
3115
3116         For <object> and <embed>, we filter out attribute values that either
3117         indicate which piece of media to load or which plugin to load.  In a
3118         perfect world, we'd only need to filter out the URLs of the media, but
3119         some plug-ins (like Flash) have lots of fun places you can hide the
3120         URL (e.g., the "movie" <param>).
3121
3122         * html/parser/XSSFilter.cpp:
3123         (WebCore::XSSFilter::filterToken):
3124         (WebCore::XSSFilter::filterScriptToken):
3125         (WebCore::XSSFilter::filterObjectToken):
3126         (WebCore::XSSFilter::filterEmbedToken):
3127         (WebCore::XSSFilter::eraseAttributeIfInjected):
3128         * html/parser/XSSFilter.h:
3129
3130 2011-01-28  Oliver Hunt  <oliver@apple.com>
3131
3132         Fix Qt build.
3133
3134         * bridge/qt/qt_runtime.cpp:
3135         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
3136         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
3137         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
3138         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
3139         * bridge/qt/qt_runtime.h:
3140
3141 2011-01-28  Antti Koivisto  <antti@apple.com>
3142
3143         Reviewed by Simon Fraser.
3144
3145         CSS styles are shared based on uninitialized property values
3146         https://bugs.webkit.org/show_bug.cgi?id=53285
3147         
3148         Null test.
3149
3150         * dom/NamedNodeMap.cpp:
3151         (WebCore::NamedNodeMap::mappedMapsEquivalent):
3152
3153 2011-01-27  Oliver Hunt  <oliver@apple.com>
3154
3155         Reviewed by Geoffrey Garen.
3156
3157         Convert markstack to a slot visitor API
3158         https://bugs.webkit.org/show_bug.cgi?id=53219
3159
3160         Update WebCore to the new marking apis, correct bindings
3161         codegen. 
3162
3163         * ForwardingHeaders/runtime/WriteBarrier.h: Added.
3164         * WebCore.exp.in:
3165         * bindings/js/DOMWrapperWorld.h:
3166         (WebCore::DOMWrapperWorld::globalData):
3167         * bindings/js/JSAudioConstructor.cpp:
3168         (WebCore::JSAudioConstructor::JSAudioConstructor):
3169         * bindings/js/JSDOMBinding.cpp:
3170         (WebCore::markDOMNodesForDocument):
3171         (WebCore::markDOMObjectWrapper):
3172         (WebCore::markDOMNodeWrapper):
3173         * bindings/js/JSDOMGlobalObject.cpp:
3174         (WebCore::JSDOMGlobalObject::markChildren):
3175         (WebCore::JSDOMGlobalObject::setInjectedScript):
3176         (WebCore::JSDOMGlobalObject::injectedScript):
3177         * bindings/js/JSDOMGlobalObject.h:
3178         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
3179         (WebCore::getDOMConstructor):
3180         * bindings/js/JSDOMWindowCustom.cpp:
3181         (WebCore::JSDOMWindow::setLocation):
3182         (WebCore::DialogHandler::dialogCreated):
3183         * bindings/js/JSDOMWindowShell.cpp:
3184         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
3185         (WebCore::JSDOMWindowShell::setWindow):
3186         (WebCore::JSDOMWindowShell::markChildren):
3187         (WebCore::JSDOMWindowShell::unwrappedObject):
3188         * bindings/js/JSDOMWindowShell.h:
3189         (WebCore::JSDOMWindowShell::window):
3190         (WebCore::JSDOMWindowShell::setWindow):
3191         * bindings/js/JSEventListener.cpp:
3192         (WebCore::JSEventListener::JSEventListener):
3193         (WebCore::JSEventListener::markJSFunction):
3194         * bindings/js/JSEventListener.h:
3195         (WebCore::JSEventListener::jsFunction):
3196         * bindings/js/JSHTMLDocumentCustom.cpp:
3197         (WebCore::JSHTMLDocument::setAll):
3198         * bindings/js/JSImageConstructor.cpp:
3199         (WebCore::JSImageConstructor::JSImageConstructor):
3200         * bindings/js/JSImageDataCustom.cpp:
3201         (WebCore::toJS):
3202         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
3203         (WebCore::JSJavaScriptCallFrame::scopeChain):
3204         (WebCore::JSJavaScriptCallFrame::scopeType):
3205         * bindings/js/JSNodeFilterCondition.cpp:
3206         (WebCore::JSNodeFilterCondition::markAggregate):
3207         (WebCore::JSNodeFilterCondition::acceptNode):
3208         * bindings/js/JSNodeFilterCondition.h:
3209         * bindings/js/JSNodeFilterCustom.cpp:
3210         * bindings/js/JSOptionConstructor.cpp:
3211         (WebCore::JSOptionConstructor::JSOptionConstructor):
3212         * bindings/js/JSSQLResultSetRowListCustom.cpp:
3213         (WebCore::JSSQLResultSetRowList::item):
3214         * bindings/js/ScriptCachedFrameData.cpp:
3215         (WebCore::ScriptCachedFrameData::restore):
3216         * bindings/js/ScriptObject.cpp:
3217         (WebCore::ScriptGlobalObject::set):
3218         * bindings/js/SerializedScriptValue.cpp:
3219         (WebCore::CloneDeserializer::putProperty):
3220         * bindings/scripts/CodeGeneratorJS.pm:
3221         * dom/Document.h:
3222
3223 2011-01-28  Sam Weinig  <sam@webkit.org>
3224
3225         Reviewed by Anders Carlsson.
3226
3227         Keyboard scrolling doesn’t work in WebKit2
3228         <rdar://problem/8909672>
3229
3230         * platform/mac/ScrollAnimatorMac.mm:
3231         (-[ScrollAnimationHelperDelegate convertSizeToBacking:]):
3232         (-[ScrollAnimationHelperDelegate convertSizeFromBacking:]):
3233         Add additional necessary delegate methods.
3234
3235 2011-01-29  Darin Adler  <darin@apple.com>
3236
3237         Reviewed by Dan Bernstein.
3238
3239         Re-land this patch with the missing null check that caused crashes in layout tests.
3240
3241         Changing cursor style has no effect until the mouse moves
3242         https://bugs.webkit.org/show_bug.cgi?id=14344
3243         rdar://problem/7563712
3244
3245         No tests added because we don't have infrastructure for testing actual cursor
3246         changes (as opposed to cursor style computation) at this time. We might add it later.
3247
3248         * page/EventHandler.cpp:
3249         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): Added.
3250         * page/EventHandler.h: Ditto.
3251
3252         * rendering/RenderObject.cpp:
3253         (WebCore::areNonIdenticalCursorListsEqual): Added.
3254         (WebCore::areCursorsEqual): Added.
3255         (WebCore::RenderObject::styleDidChange): Call dispatchFakeMouseMoveEventSoon if
3256         cursor styles changed.
3257
3258 2011-01-28  Justin Schuh  <jschuh@chromium.org>
3259
3260         Reviewed by Eric Seidel.
3261
3262         We should hold RefPtrs to SVG font faces
3263         https://bugs.webkit.org/show_bug.cgi?id=53270
3264
3265         Test: svg/custom/use-multiple-on-nested-disallowed-font.html
3266
3267         * css/CSSFontFaceSource.cpp:
3268         (WebCore::CSSFontFaceSource::getFontData):
3269         * css/CSSFontFaceSource.h:
3270         * svg/SVGFontFaceElement.cpp:
3271         (WebCore::SVGFontFaceElement::associatedFontElement):
3272         * svg/SVGFontFaceElement.h:
3273
3274 2011-01-28  Zhenyao Mo  <zmo@google.com>
3275
3276         Reviewed by Kenneth Russell.
3277
3278         uniformN*v should generate INVALID_VALUE of the array size is not a multiple of N
3279         https://bugs.webkit.org/show_bug.cgi?id=53306
3280
3281         * html/canvas/WebGLRenderingContext.cpp:
3282         (WebCore::WebGLRenderingContext::validateUniformMatrixParameters):
3283
3284 2011-01-28  Tom Sepez  <tsepez@chromium.org>
3285
3286         Reviewed by Eric Seidel.
3287
3288         NULL pointer crash in TextIterator::handleTextBox()
3289         https://bugs.webkit.org/show_bug.cgi?id=53267
3290
3291         Test: fast/css/rtl-nth-child-first-letter-crash.html
3292
3293         * editing/TextIterator.cpp:
3294         (WebCore::TextIterator::handleTextBox):
3295
3296 2011-01-28  Adrienne Walker  <enne@google.com>
3297
3298         Reviewed by Kenneth Russell.
3299
3300         [chromium] Remove a spurious diagnostic CRASH check.
3301         https://bugs.webkit.org/show_bug.cgi?id=52379
3302
3303         * platform/graphics/chromium/LayerTilerChromium.cpp:
3304         (WebCore::LayerTilerChromium::invalidateRect):
3305
3306 2011-01-28  Dan Bernstein  <mitz@apple.com>
3307
3308         Reviewed by Sam Weinig.
3309
3310         <rdar://problem/4761512> <select> can't display right-to-left (rtl) languages
3311         https://bugs.webkit.org/show_bug.cgi?id=19785
3312
3313         Changed <select> pop-up menus on Mac OS X Snow Leopard and later to have their items aligned in the
3314         direction corresponding to the writing direction of the <select> element, with the checkmarks
3315         on the "start" side, and use the <option>'s writing direction rather than "natural". Made the
3316         pop-up button match the menu by adding a Chrome boolean function, selectItemAlignmentFollowsMenuWritingDirection(),
3317         which returns true for this pop-up behavior.
3318
3319         * loader/EmptyClients.h:
3320         (WebCore::EmptyChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
3321         * manual-tests/pop-up-alignment-and-direction.html: Added.
3322         * page/Chrome.cpp:
3323         (WebCore::Chrome::selectItemAlignmentFollowsMenuWritingDirection): Added. Calls through to the
3324         client.
3325         * page/Chrome.h:
3326         * page/ChromeClient.h:
3327         * platform/PopupMenuStyle.h:
3328         (WebCore::PopupMenuStyle::PopupMenuStyle): Added hasTextDirectionOverride parameter and member
3329         variable initialization.
3330         (WebCore::PopupMenuStyle::hasTextDirectionOverride): Added this accessor.
3331         * platform/mac/PopupMenuMac.mm:
3332         (WebCore::PopupMenuMac::populate): Set the pop-up's layout direction and items' text alignment
3333         to match the menu's writing direction. Set items' writing direction and direction override
3334         according to their styles.
3335         * rendering/RenderMenuList.cpp:
3336         (WebCore::RenderMenuList::RenderMenuList): Removed unncesaary initialization of a smart pointer.
3337         (WebCore::RenderMenuList::adjustInnerStyle): If the alignment of items in the menu follows the
3338         menu's writing direction, use that alignment for the button as well. Also in this mode, use the
3339         item's writing direction and override setting.
3340         (WebCore::RenderMenuList::setTextFromOption): Store the option element's style.
3341         (WebCore::RenderMenuList::itemStyle): Pass the text direction override value.
3342         (WebCore::RenderMenuList::menuStyle): Ditto. Also use the button's direction, not the inner text's.
3343         * rendering/RenderMenuList.h:
3344         * rendering/RenderTextControlSingleLine.cpp:
3345         (WebCore::RenderTextControlSingleLine::menuStyle): Pass the text direction override value.
3346
3347 2011-01-28  Adam Barth  <abarth@webkit.org>
3348
3349         Reviewed by Daniel Bates.
3350
3351         Teach XSSFilter how to filter <script> elements
3352         https://bugs.webkit.org/show_bug.cgi?id=53279
3353
3354         This patch adds the ability for the XSSFilter to block injected
3355         <script> elements.  Handling script elements is slightly subtle because
3356         these elements act very differently depending on whether they have a
3357         src attribute.
3358         
3359         In the "src case", which check whether the src attribute was present in
3360         the request.  In the "non-src case", we check whether the start tag and
3361         the body of the script element was included in the request.  Checking
3362         for the whole start tag means we miss out on some attribute splitting
3363         attacks inside of script tags, but that doesn't seem like that big a
3364         deal.
3365
3366         This patch also introduces some amount of state into the XSSFilter
3367         because inline script elements span multiple tokens.  There's a lot of
3368         tuning and optimization left in these cases, some of which I've noted
3369         with FIXMEs.
3370
3371         To test this patch, I played around with some of the existing
3372         XSSAuditor tests.  Hopefully I'll be able to run the test suite more
3373         systematically in the future.
3374
3375         * html/parser/HTMLToken.h:
3376         (WebCore::HTMLToken::eraseCharacters):
3377         (WebCore::HTMLToken::eraseValueOfAttribute):
3378         * html/parser/XSSFilter.cpp:
3379         (WebCore::HTMLNames::hasName):
3380         (WebCore::HTMLNames::findAttributeWithName):
3381         (WebCore::HTMLNames::isNameOfScriptCarryingAttribute):
3382         (WebCore::XSSFilter::XSSFilter):
3383         (WebCore::XSSFilter::filterToken):
3384         (WebCore::XSSFilter::filterTokenAfterScriptStartTag):
3385         (WebCore::XSSFilter::filterScriptToken):
3386         (WebCore::XSSFilter::snippetForRange):
3387         (WebCore::XSSFilter::snippetForAttribute):
3388         * html/parser/XSSFilter.h:
3389
3390 2011-01-28  Adam Barth  <abarth@webkit.org>
3391
3392         Reviewed by Daniel Bates.
3393
3394         Sketch out new XSS filter design (disabled by default)
3395         https://bugs.webkit.org/show_bug.cgi?id=53205
3396
3397         This patch adds a basic sketch of the new XSS filter design.  Rather
3398         than watching scripts as they execute, in this design, we watch tokens
3399         emitted by the tokenizer.  We then map the tokens directly back into
3400         input characters, which lets us skip all the complicated logic related
3401         to HTML entities and double-decoding of JavaScript URLs.
3402
3403         This patch contains only the bare essentially machinery.  I'll add more
3404         in future patches and eventually remove the previous code once this
3405         code is up and running correctly.
3406
3407         * Android.mk:
3408         * CMakeLists.txt:
3409         * GNUmakefile.am:
3410         * WebCore.gypi:
3411         * WebCore.pro:
3412         * WebCore.vcproj/WebCore.vcproj:
3413         * WebCore.xcodeproj/project.pbxproj:
3414         * html/parser/HTMLDocumentParser.cpp:
3415         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3416         (WebCore::HTMLDocumentParser::pumpTokenizer):
3417         (WebCore::HTMLDocumentParser::sourceForToken):
3418         * html/parser/HTMLDocumentParser.h:
3419         * html/parser/XSSFilter.cpp: Added.
3420         * html/parser/XSSFilter.h: Added.
3421
3422 2011-01-28  Michael Saboff  <msaboff@apple.com>
3423
3424         Reviewed by Geoffrey Garen.
3425
3426         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
3427         https://bugs.webkit.org/show_bug.cgi?id=53271
3428
3429         Reapplying this patch with the change that the second ASSERT in 
3430         RootObject::removeRuntimeObject was changed to use
3431         .uncheckedGet() instead of the failing .get().  The object in question
3432         could be in the process of being GC'ed.  The get() call will not return
3433         such an object while the uncheckedGet() call will return the (unsafe) 
3434         object.  This is the behavior we want.
3435
3436         Precautionary change.
3437         Changed RootObject to use WeakGCMap instead of HashSet.
3438         Found will looking for another issue, but can't produce a test case
3439         that is problematic.  THerefore there aren't any new tests.
3440
3441         * bridge/runtime_root.cpp:
3442         (JSC::Bindings::RootObject::invalidate):
3443         (JSC::Bindings::RootObject::addRuntimeObject):
3444         (JSC::Bindings::RootObject::removeRuntimeObject):
3445         * bridge/runtime_root.h:
3446
3447 2011-01-28  Adam Roben  <aroben@apple.com>
3448
3449         Notify CACFLayerTreeHost when the context is flushed
3450
3451         LegacyCACFLayerTreeHost was keeping this a secret, which meant that WebCore's animation
3452         timers were never starting.
3453
3454         Fixes <http://webkit.org/b/53302> [Windows 7 Release Tests] changesets 76853, 76856, and
3455         76858 broke ~36 animations, compositing, and transitions tests
3456
3457         Reviewed by Sam Weinig.
3458
3459         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
3460         (WebCore::LegacyCACFLayerTreeHost::contextDidChange): Call up to the base class after we
3461         start our render timer.
3462
3463 2011-01-28  Antti Koivisto  <antti@apple.com>
3464
3465         Reviewed by Dan Bernstein.
3466
3467         Remove dead code that tried to map from CSS values to parser values
3468         https://bugs.webkit.org/show_bug.cgi?id=53318
3469
3470         * css/CSSFunctionValue.cpp:
3471         * css/CSSFunctionValue.h:
3472         * css/CSSPrimitiveValue.cpp:
3473         * css/CSSPrimitiveValue.h:
3474         * css/CSSValue.h:
3475         * css/CSSValueList.cpp:
3476         * css/CSSValueList.h:
3477
3478 2011-01-28  Enrica Casucci  <enrica@apple.com>
3479
3480         Reviewed by Adam Roben.
3481
3482         Some drag and drop tests fail since r76824
3483         https://bugs.webkit.org/show_bug.cgi?id=53304
3484
3485         There were '||' instead of '&&' in the checks for valid
3486         clipboard content.
3487         
3488         * platform/win/ClipboardWin.cpp:
3489         (WebCore::ClipboardWin::getData):
3490         (WebCore::ClipboardWin::types):
3491         (WebCore::ClipboardWin::files):
3492
3493 2011-01-28  Martin Robinson  <mrobinson@igalia.com>
3494
3495         [GTK] AudioProcessingEvent.h and JSJavaScriptAudioNode.h: No such file or directory
3496         https://bugs.webkit.org/show_bug.cgi?id=52889
3497
3498         Build fix for WebAudio. Include WebAudio source files on the source
3499         list when WebAudio is enabled.
3500
3501         * GNUmakefile.am: Include missing source files.
3502
3503 2011-01-28  Sam Weinig  <sam@webkit.org>
3504
3505         Reviewed by Maciej Stachowiak.
3506
3507         Add basic rubber banding support
3508         <rdar://problem/8219429>
3509         https://bugs.webkit.org/show_bug.cgi?id=53277
3510
3511         * page/EventHandler.cpp:
3512         (WebCore::EventHandler::handleGestureEvent):
3513         Pass gesture events to the FrameView.
3514
3515         * platform/ScrollAnimator.cpp:
3516         (WebCore::ScrollAnimator::handleGestureEvent):
3517         * platform/ScrollAnimator.h:
3518         Add stubbed out implementation.
3519
3520         * platform/ScrollView.cpp:
3521         (WebCore::ScrollView::ScrollView):
3522         (WebCore::ScrollView::overhangAmount):
3523         (WebCore::ScrollView::wheelEvent):
3524         * platform/ScrollView.h:
3525         * platform/ScrollableArea.cpp:
3526         (WebCore::ScrollableArea::ScrollableArea):
3527         (WebCore::ScrollableArea::handleGestureEvent):
3528         * platform/ScrollableArea.h:
3529         (WebCore::ScrollableArea::constrainsScrollingToContentEdge):
3530         (WebCore::ScrollableArea::setConstrainsScrollingToContentEdge):
3531         Move constrains scrolling bit to ScrollableArea from ScrollView.
3532
3533         (WebCore::ScrollableArea::contentsSize):
3534         (WebCore::ScrollableArea::overhangAmount):
3535         Add additional virtual functions for information needed by the animator.
3536
3537         * platform/mac/ScrollAnimatorMac.h:
3538         * platform/mac/ScrollAnimatorMac.mm:
3539         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3540         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
3541         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
3542         (WebCore::elasticDeltaForTimeDelta):
3543         (WebCore::elasticDeltaForReboundDelta):
3544         (WebCore::reboundDeltaForElasticDelta):
3545         (WebCore::scrollWheelMultiplier):
3546         (WebCore::ScrollAnimatorMac::handleWheelEvent):
3547         (WebCore::ScrollAnimatorMac::handleGestureEvent):
3548         (WebCore::ScrollAnimatorMac::pinnedInDirection):
3549         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
3550         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
3551         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
3552         (WebCore::ScrollAnimatorMac::beginScrollGesture):
3553         (WebCore::ScrollAnimatorMac::endScrollGesture):
3554         (WebCore::ScrollAnimatorMac::snapRubberBand):
3555         (WebCore::roundTowardZero):
3556         (WebCore::roundToDevicePixelTowardZero):
3557         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
3558         Implement basic rubber banding.
3559
3560 2011-01-28  Dan Bernstein  <mitz@apple.com>
3561
3562         Reviewed by Anders Carlsson.
3563
3564         Changing unicode-bidi doesn’t force layout
3565         https://bugs.webkit.org/show_bug.cgi?id=53311
3566
3567         Test: fast/dynamic/unicode-bidi.html
3568
3569         * rendering/style/RenderStyle.cpp:
3570         (WebCore::RenderStyle::diff): Return a layout difference if unicode-bidi values differ.
3571
3572 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
3573
3574         Reviewed by Kent Tamura.