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