1 2013-02-11 Viatcheslav Ostapenko <sl.ostapenko@samsung.com>
3 [Qt][EFL][WebGL] Minor refactoring of GraphicsSurface/GraphicsSurfaceGLX
4 https://bugs.webkit.org/show_bug.cgi?id=108686
6 Reviewed by Noam Rosenthal.
8 Remove unused platformSurface()/m_platformSurface from GraphicsSurface.
9 Move m_texture from GraphicsSurface to GLX GraphicsSurfacePrivate to match
10 Win and Mac implementations.
12 No new tests, refactoring only.
14 * platform/graphics/surfaces/GraphicsSurface.cpp:
15 (WebCore::GraphicsSurface::GraphicsSurface):
16 * platform/graphics/surfaces/GraphicsSurface.h:
18 * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
19 (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
20 (WebCore::GraphicsSurfacePrivate::swapBuffers):
21 (WebCore::GraphicsSurfacePrivate::surface):
22 (GraphicsSurfacePrivate):
23 (WebCore::GraphicsSurfacePrivate::textureID):
24 (WebCore::GraphicsSurfacePrivate::clear):
25 (WebCore::GraphicsSurface::platformExport):
26 (WebCore::GraphicsSurface::platformGetTextureID):
27 (WebCore::GraphicsSurface::platformSwapBuffers):
28 (WebCore::GraphicsSurface::platformCreate):
29 (WebCore::GraphicsSurface::platformImport):
30 (WebCore::GraphicsSurface::platformDestroy):
32 2013-02-11 Viatcheslav Ostapenko <sl.ostapenko@samsung.com>
34 [EFL][WebGL] WebGL content is not painted after resizing the viewport.
35 https://bugs.webkit.org/show_bug.cgi?id=106358
37 Reviewed by Noam Rosenthal.
39 When page size changes and layer parameters get updated LayerTreeRenderer::setLayerState
40 clears the layer backing store and detaches the canvas surface from the layer. If the layer
41 size is not changed then the canvas is not recreated. This leaves the canvas detached from
42 the layer, but still referenced from m_surfaceBackingStores.
43 Don't assign layer backing store to layer in assignImageBackingToLayer if there is a canvas
44 surface already attached to the layer.
46 Test: fast/canvas/webgl/webgl-layer-update.html
48 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
49 (WebCore::CoordinatedGraphicsScene::setLayerState):
50 (WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
51 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
53 2013-02-11 Eric Carlson <eric.carlson@apple.com>
55 [Mac] Track language selection should be sticky
56 https://bugs.webkit.org/show_bug.cgi?id=109466
58 Reviewed by Dean Jackson.
60 Choosing a text track from the caption menu should make that track's language the
61 preferred caption language. Turning captions off from the menu should disable captions
62 in videos loaded subsequently.
64 OS X has system support for these settings, so changes made by DRT should not change the
65 settings on the user's system. Add support for all other ports in DRT only.
67 Test: media/track/track-user-preferences.html
69 * WebCore.exp.in: Export PageGroup::captionPreferences().
71 * html/HTMLMediaElement.cpp:
72 (WebCore::HTMLMediaElement::HTMLMediaElement): Use page()->group().captionPreferences().
73 (WebCore::HTMLMediaElement::attach): Ditto.
74 (WebCore::HTMLMediaElement::detach): Ditto.
75 (WebCore::HTMLMediaElement::userPrefersCaptions): Ditto.
76 (WebCore::HTMLMediaElement::configureTextTrackGroup): Ditto. Update for
77 preferredLanguageFromList change.
78 (WebCore::HTMLMediaElement::toggleTrackAtIndex): Set user prefs for captions visible and
79 caption language as appropriate.
81 * html/shadow/MediaControlElements.cpp:
82 (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Remove unneeded comment.
83 (WebCore::MediaControlTextTrackContainerElement::updateSizes): Use page()->group().captionPreferences().
85 * html/shadow/MediaControlsApple.cpp:
86 (WebCore::MediaControlsApple::closedCaptionTracksChanged): Update caption menu button visibility.
88 * page/CaptionUserPreferences.h:
89 (WebCore::CaptionUserPreferences::userPrefersCaptions): Support "testing" mode.
90 (WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
91 (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks): Ditto.
92 (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks): Ditto.
93 (WebCore::CaptionUserPreferences::setPreferredLanguage): Ditto.
94 (WebCore::CaptionUserPreferences::preferredLanguages): Ditto.
95 (WebCore::CaptionUserPreferences::testingMode): Ditto.
96 (WebCore::CaptionUserPreferences::setTestingMode): Ditto.
97 (WebCore::CaptionUserPreferences::CaptionUserPreferences): Ditto.
99 * page/CaptionUserPreferencesMac.h:
100 * page/CaptionUserPreferencesMac.mm:
101 (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Support "testing" mode.
102 (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
103 (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
104 (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Change name from
105 registerForCaptionPreferencesChangedCallbacks. Support "testing" mode.
106 (WebCore::CaptionUserPreferencesMac::unregisterForPreferencesChangedCallbacks): Change name from
107 unregisterForCaptionPreferencesChangedCallbacks. Support "testing" mode.
108 (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Support "testing" mode.
109 (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
110 (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
111 (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto. Return the platform override when set.
113 * page/PageGroup.cpp:
114 (WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): Remove because it is already
115 available from the caption preference object.
116 (WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
117 (WebCore::PageGroup::userPrefersCaptions): Ditto.
118 (WebCore::PageGroup::userHasCaptionPreferences): Ditto.
119 (WebCore::PageGroup::captionFontSizeScale): Ditto.
122 * platform/Language.cpp:
123 (WebCore::preferredLanguageFromList): Take the list of preferred languages instead of assuming
125 * platform/Language.h:
127 * testing/Internals.cpp:
128 (WebCore::Internals::resetToConsistentState): Disable caption testing mode.
129 (WebCore::Internals::Internals): Enable caption testing mode so the user's system
130 preferences are not modified.
132 2013-02-11 Huang Dongsung <luxtella@company100.net>
134 Coordinated Graphics: Make CoordinatedGraphicsScene not know contents size.
135 https://bugs.webkit.org/show_bug.cgi?id=108922
137 Reviewed by Noam Rosenthal.
139 Currently, CoordinatedGraphicsScene has two methods to know contents
140 size: setContentsSize() and setVisibleContentsRect(). Contents size is
141 used when adjusting a scroll position, but adjustment is not needed
142 because EFL and Qt platform code (currently PageViewportController)
143 already adjusts a scroll position, and it is natural for each platform
144 to be in charge of adjusting. So this patch makes CoordinatedGraphicsScene
145 not know contents size.
147 In addition, now DrawingAreaProxy::coordinatedLayerTreeHostProxy() is only used
148 to get CoordinatedGraphicsScene.
150 This patch can only be tested manually since there is no automated
151 testing facilities for in-motion touch.
152 Test: ManualTests/fixed-position.html
153 ManualTests/nested-fixed-position.html
155 * platform/graphics/texmap/TextureMapperLayer.cpp:
156 (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
157 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
158 (WebCore::CoordinatedGraphicsScene::setScrollPosition):
159 (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
160 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
161 (CoordinatedGraphicsScene):
163 2013-02-11 Huang Dongsung <luxtella@company100.net>
165 Coordinated Graphics: remove the DidChangeScrollPosition message.
166 https://bugs.webkit.org/show_bug.cgi?id=108051
168 Reviewed by Noam Rosenthal.
169 Signed off for WebKit2 by Benjamin Poulain.
171 Currently, we use the DidChangeScrollPosition message to send the scroll
172 position that WebCore used in this frame to UI Process. We had to have
173 some member variables for the DidChangeScrollPosition message.
174 However, we can send a scroll position via the DidRenderFrame message,
175 because CoordinatedGraphicsScene::m_renderedContentsScrollPosition is
176 updated at the moment of flushing. So we can remove the
177 DidChangeScrollPosition message and some redundant member variables.
179 No tests. No change in behavior.
181 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
182 (WebCore::CoordinatedGraphicsScene::flushLayerChanges):
183 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
184 (CoordinatedGraphicsScene):
186 2013-02-11 Ryosuke Niwa <rniwa@webkit.org>
188 Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
189 https://bugs.webkit.org/show_bug.cgi?id=109534
191 Reviewed by Anders Carlsson.
193 * editing/DeleteButtonController.cpp:
194 (WebCore::DeleteButtonController::show):
195 * editing/Editor.cpp:
199 * loader/EmptyClients.h:
200 (WebCore::EmptyEditorClient::shouldDeleteRange):
202 (WebCore::EmptyEditorClient::shouldShowDeleteInterface):
203 * page/EditorClient.h:
206 2013-02-11 Hayato Ito <hayato@chromium.org>
208 Factor EventContext and introduces MouseOrFocusEventContext.
209 https://bugs.webkit.org/show_bug.cgi?id=109278
211 Reviewed by Dimitri Glazkov.
213 To supoort Touch event retargeting (bug 107800), we have to factor
214 event retargeting code so that it can support not only MouseEvent or FocusEvent,
215 but also other events.
217 This is the first attempt to refactor event retargeting code, a
218 separated patch from bug 109156. EventContext is now factored and
219 MouseOrFocusEventContext was introduced to support MouseEvent or
220 FocusEvent separately.
222 In following patches, I'll introduce TouchEventContext and
223 TouchEventDispatchMediator to support Touch event retargeting.
225 No new tests. No change in functionality.
227 * dom/EventContext.cpp:
228 (WebCore::EventContext::EventContext): Factor relatedTarget out from EventContext into MouseOrFocusEventContext.
229 (WebCore::EventContext::~EventContext):
231 (WebCore::EventContext::handleLocalEvents):
232 (WebCore::EventContext::isMouseOrFocusEventContext):
233 (WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext): New. Handles MouseEvent's (or FocusEvent's) relatedTarget retargeting.
234 (WebCore::MouseOrFocusEventContext::~MouseOrFocusEventContext):
235 (WebCore::MouseOrFocusEventContext::handleLocalEvents):
236 (WebCore::MouseOrFocusEventContext::isMouseOrFocusEventContext):
237 * dom/EventContext.h:
239 (WebCore::EventContext::node):
240 (WebCore::EventContext::target):
241 (WebCore::EventContext::currentTargetSameAsTarget):
243 (MouseOrFocusEventContext):
244 (WebCore::MouseOrFocusEventContext::relatedTarget):
245 (WebCore::MouseOrFocusEventContext::setRelatedTarget):
246 * dom/EventDispatcher.cpp:
247 (WebCore::EventRelatedTargetAdjuster::adjust):
248 (WebCore::EventDispatcher::adjustRelatedTarget):
249 (WebCore::EventDispatcher::ensureEventPath): Renamad from ensureEventAncestors. Use the DOM Core terminology.
250 (WebCore::EventDispatcher::dispatchEvent):
251 (WebCore::EventDispatcher::dispatchEventAtCapturing):
252 (WebCore::EventDispatcher::dispatchEventAtTarget):
253 (WebCore::EventDispatcher::dispatchEventAtBubbling):
254 (WebCore::EventDispatcher::dispatchEventPostProcess):
255 (WebCore::EventDispatcher::topEventContext):
256 * dom/EventDispatcher.h:
257 (EventRelatedTargetAdjuster):
259 * inspector/InspectorInstrumentation.cpp:
261 (WebCore::eventHasListeners):
262 (WebCore::InspectorInstrumentation::willDispatchEventImpl):
263 * inspector/InspectorInstrumentation.h:
264 (InspectorInstrumentation):
265 (WebCore::InspectorInstrumentation::willDispatchEvent):
267 2013-02-11 peavo@outlook.com <peavo@outlook.com>
269 [Curl] setCookiesFromDOM function does not save cookies to disk.
270 https://bugs.webkit.org/show_bug.cgi?id=109285
272 Reviewed by Brent Fulgham.
274 Write cookies to disk by using the Curl easy api.
276 * platform/network/curl/CookieJarCurl.cpp:
277 (WebCore::setCookiesFromDOM):Write cookie to disk.
278 * platform/network/curl/ResourceHandleManager.cpp:
279 (WebCore::ResourceHandleManager::getCurlShareHandle): Added method to get Curl share handle.
280 (WebCore::ResourceHandleManager::getCookieJarFileName): Added method to get cookie file name.
281 * platform/network/curl/ResourceHandleManager.h: Added methods to get cookie file name, and Curl share handle.
283 2013-02-11 Hayato Ito <hayato@chromium.org>
285 Split each RuleSet and feature out from StyleResolver into its own class.
286 https://bugs.webkit.org/show_bug.cgi?id=107777
288 Reviewed by Dimitri Glazkov.
290 Re-landing r141964, which was reverted in r141973, since r141964 seem to be innocent.
292 No tests. No change in behavior.
295 * GNUmakefile.list.am:
298 * WebCore.xcodeproj/project.pbxproj:
299 * css/CSSAllInOne.cpp:
300 * css/DocumentRuleSets.cpp: Added.
302 (WebCore::DocumentRuleSets::DocumentRuleSets):
303 (WebCore::DocumentRuleSets::~DocumentRuleSets):
304 (WebCore::DocumentRuleSets::initUserStyle): New helper to initialize each RuleSets.
305 (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets): Factored out from StyleResolver.
306 (WebCore::makeRuleSet): Ditto.
307 (WebCore::DocumentRuleSets::resetAuthorStyle): Ditto.
308 (WebCore::DocumentRuleSets::appendAuthorStyleSheets): Ditto.
309 (WebCore::DocumentRuleSets::collectFeatures): Ditto.
310 (WebCore::DocumentRuleSets::reportMemoryUsage): New methods to report memory usage. Factored out from StyleResolver.
311 * css/DocumentRuleSets.h: Added.
314 (WebCore::DocumentRuleSets::authorStyle): Moved from StyleResolver.
315 (WebCore::DocumentRuleSets::userStyle): Ditto.
316 (WebCore::DocumentRuleSets::features): Ditto.
317 (WebCore::DocumentRuleSets::sibling): Ditto.
318 (WebCore::DocumentRuleSets::uncommonAttribute): Ditto.
319 * css/StyleResolver.cpp:
320 (WebCore::StyleResolver::StyleResolver):
321 (WebCore::StyleResolver::appendAuthorStyleSheets): Now calls DocumentRuleSets::appendAuthorStyleSheets.
322 (WebCore::StyleResolver::matchAuthorRules): Use m_ruleSets.
323 (WebCore::StyleResolver::matchUserRules): Ditto.
324 (WebCore::StyleResolver::classNamesAffectedByRules): Ditto.
325 (WebCore::StyleResolver::locateCousinList): Ditto.
326 (WebCore::StyleResolver::canShareStyleWithElement): Ditto.
327 (WebCore::StyleResolver::locateSharedStyle): Ditto.
328 (WebCore::StyleResolver::styleForPage): Ditto.
329 (WebCore::StyleResolver::checkRegionStyle): Ditto.
330 (WebCore::StyleResolver::applyProperty): Ditto.
331 (WebCore::StyleResolver::reportMemoryUsage): Now calls DocumentRuleSets::reportMemoryUsage.
332 * css/StyleResolver.h:
333 (WebCore::StyleResolver::scopeResolver):
335 (WebCore::StyleResolver::ruleSets): accessor r to DocumentRuleSets.
336 (WebCore::StyleResolver::usesSiblingRules): Use m_ruleSets.
337 (WebCore::StyleResolver::usesFirstLineRules): Ditto.
338 (WebCore::StyleResolver::usesBeforeAfterRules): Ditto.
339 (WebCore::StyleResolver::hasSelectorForAttribute): Ditto.
340 (WebCore::StyleResolver::hasSelectorForClass): Ditto.
341 (WebCore::StyleResolver::hasSelectorForId): Ditto.
342 * dom/DocumentStyleSheetCollection.cpp:
343 (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
345 2013-02-11 Keishi Hattori <keishi@webkit.org>
347 REGRESSION (r140778):Calendar Picker buttons are wrong when rtl
348 https://bugs.webkit.org/show_bug.cgi?id=109158
350 Reviewed by Kent Tamura.
352 The calendar picker button's icon and position where wrong when rtl.
355 Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html
357 * Resources/pagepopups/calendarPicker.css:
358 (.year-month-button-left .year-month-button): Use -webkit-margin-end so the margin is applide to the right side.
359 (.year-month-button-right .year-month-button): Use -webkit-margin-start so the margin is applide to the right side.
360 (.today-clear-area .today-button): Use -webkit-margin-end so the margin is applide to the right side.
361 * Resources/pagepopups/calendarPicker.js:
362 (YearMonthController.prototype._attachLeftButtonsTo): Flip icon image when rtl.
363 (YearMonthController.prototype._attachRightButtonsTo): Ditto.
365 2013-02-11 KwangYong Choi <ky0.choi@samsung.com>
367 REGRESSION (r142549): Remove web intents code
368 https://bugs.webkit.org/show_bug.cgi?id=109532
370 Reviewed by Nico Weber.
372 Remove remaning code related to web intents.
374 No new tests, no change on behavior.
377 * bindings/js/JSIntentConstructor.cpp: Removed.
379 2013-02-11 Kenneth Russell <kbr@google.com>
381 Add temporary typedef to ANGLEWebKitBridge to support incompatible API upgrade
382 https://bugs.webkit.org/show_bug.cgi?id=109127
384 Reviewed by Dean Jackson.
386 No new tests. Built and tested WebKit and Chromium with this change.
388 * platform/graphics/ANGLEWebKitBridge.cpp:
390 Define temporary typedef spanning int -> size_t change.
391 (WebCore::getValidationResultValue):
392 (WebCore::getSymbolInfo):
393 Use temporary typedef.
395 2013-02-11 Kentaro Hara <haraken@chromium.org>
397 [V8] ScheduledAction::m_context can be empty, so we shouldn't
398 retrieve an Isolate by using m_context->GetIsolate()
399 https://bugs.webkit.org/show_bug.cgi?id=109523
401 Reviewed by Adam Barth.
403 Chromium bug: https://code.google.com/p/chromium/issues/detail?id=175307#makechanges
405 Currently ScheduledAction is retrieving an Isolate by using m_context->GetIsolate().
406 This can crash because ScheduledAction::m_context can be empty. Specifically,
407 ScheduledAction::m_context is set to ScriptController::currentWorldContext(),
408 which can return an empty handle when a frame does not exist. In addition,
409 'if(context.IsEmpty())' in ScheduledAction.cpp implies that it can be empty.
411 Alternately, we should pass an Isolate explicitly when a ScheduledAction is instantiated.
413 No tests. The Chromium crash report doesn't provide enough information
414 to reproduce the bug.
416 * bindings/v8/ScheduledAction.cpp:
417 (WebCore::ScheduledAction::ScheduledAction):
419 (WebCore::ScheduledAction::~ScheduledAction):
420 * bindings/v8/ScheduledAction.h:
422 * bindings/v8/custom/V8DOMWindowCustom.cpp:
423 (WebCore::WindowSetTimeoutImpl):
424 * bindings/v8/custom/V8WorkerContextCustom.cpp:
425 (WebCore::SetTimeoutOrInterval):
427 2013-02-11 Adenilson Cavalcanti <cavalcantii@gmail.com>
429 Build fix: r142549 broke EFL build
430 https://bugs.webkit.org/show_bug.cgi?id=109527
432 Reviewed by Kentaro Hara.
434 No new tests, no change on behavior.
438 2013-02-11 Simon Fraser <simon.fraser@apple.com>
440 REGRESSION (r142520?): Space no longer scrolls the page
441 https://bugs.webkit.org/show_bug.cgi?id=109526
443 Reviewed by Tim Horton.
445 ScrollingTree::updateTreeFromStateNode() used to bail early when it had
446 no children (no fixed or sticky elements), but that left updateAfterChildren()
447 uncalled. Fix by always calling updateAfterChildren(), which updates the scroll
450 * page/scrolling/ScrollingTree.cpp:
451 (WebCore::ScrollingTree::updateTreeFromStateNode):
453 2013-02-11 Tim Horton <timothy_horton@apple.com>
455 Remove extra early-return in FrameView::setScrollPosition
457 Rubber-stamped by Simon Fraser.
459 * page/FrameView.cpp:
460 (WebCore::FrameView::setScrollPosition):
462 2013-02-11 Arko Saha <arko@motorola.com>
464 [Microdata] Fix crash after r141034 in chromuim port
465 https://bugs.webkit.org/show_bug.cgi?id=109514
467 Reviewed by Ryosuke Niwa.
469 Added V8SkipVTableValidation extended attribute to skip
470 VTable validation check for DOMSettableTokenList interface.
472 This patch fixes below test failures:
473 Tests: fast/dom/MicroData/domsettabletokenlist-attributes-add-token.html
474 fast/dom/MicroData/domsettabletokenlist-attributes-out-of-range-index.html
475 fast/dom/MicroData/element-with-empty-itemprop.html
476 fast/dom/MicroData/itemprop-add-remove-tokens.html
477 fast/dom/MicroData/itemprop-for-an-element-must-be-correct.html
478 fast/dom/MicroData/itemprop-must-be-read-only.html
479 fast/dom/MicroData/itemprop-reflected-by-itemProp-property.html
480 fast/dom/MicroData/itemref-add-remove-tokens.html
481 fast/dom/MicroData/itemref-attribute-reflected-by-itemRef-property.html
482 fast/dom/MicroData/itemref-for-an-element-must-be-correct.html
483 fast/dom/MicroData/itemref-must-be-read-only.html
484 fast/dom/MicroData/itemtype-add-remove-tokens.html
485 fast/dom/MicroData/itemtype-attribute-test.html
486 fast/dom/MicroData/microdata-domtokenlist-attribute-add-remove-tokens.html
487 fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html
488 fast/dom/MicroData/propertynodelist-add-remove-itemprop-tokens.html
489 fast/dom/MicroData/propertynodelist-add-remove-itemref-tokens.html
491 * html/DOMSettableTokenList.idl:
493 2013-02-11 Adam Barth <abarth@webkit.org>
495 Load event fires too early with threaded HTML parser (take 2)
496 https://bugs.webkit.org/show_bug.cgi?id=109485
498 Reviewed by Eric Seidel.
500 This patch restores the code that was removed in
501 http://trac.webkit.org/changeset/142492 and adds code to
502 DocumentLoader.cpp to avoid the regression.
505 (WebCore::Document::hasActiveParser):
506 (WebCore::Document::decrementActiveParserCount):
507 * loader/DocumentLoader.cpp:
508 (WebCore::DocumentLoader::isLoadingInAPISense):
510 2013-02-11 Eric Seidel <eric@webkit.org>
512 Fold HTMLTokenizerState back into HTMLTokenizer now that MarkupTokenizerBase is RFG
513 https://bugs.webkit.org/show_bug.cgi?id=109502
515 Reviewed by Tony Gentilcore.
517 Just a search replace of HTMLTokenizerState with HTMLTokenizer and moving the enum.
518 This restores us to the peacefull world pre-NEW_XML.
520 * html/parser/BackgroundHTMLParser.cpp:
521 (WebCore::BackgroundHTMLParser::forcePlaintextForTextDocument):
522 (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
523 * html/parser/HTMLDocumentParser.cpp:
524 (WebCore::tokenizerStateForContextElement):
525 (WebCore::HTMLDocumentParser::forcePlaintextForTextDocument):
526 (WebCore::HTMLDocumentParser::pumpTokenizer):
527 * html/parser/HTMLTokenizer.cpp:
528 (WebCore::isEndTagBufferingState):
530 (WebCore::HTMLTokenizer::reset):
531 (WebCore::HTMLTokenizer::flushEmitAndResumeIn):
532 (WebCore::HTMLTokenizer::nextToken):
533 (WebCore::HTMLTokenizer::updateStateFor):
534 * html/parser/HTMLTokenizer.h:
536 (WebCore::HTMLTokenizer::create):
537 (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
538 (WebCore::HTMLTokenizer::emitEndOfFile):
539 * html/parser/HTMLTreeBuilder.cpp:
540 (WebCore::HTMLTreeBuilder::processStartTagForInBody):
541 (WebCore::HTMLTreeBuilder::processEndTag):
542 (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
543 (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
544 (WebCore::HTMLTreeBuilder::processScriptStartTag):
545 * html/parser/TextViewSourceParser.cpp:
546 (WebCore::TextViewSourceParser::TextViewSourceParser):
548 2013-02-11 Kentaro Hara <haraken@chromium.org>
550 Build fix after r142528
551 https://bugs.webkit.org/show_bug.cgi?id=109520
553 Reviewed by Eric Seidel.
555 r142528 changed GIFImageReader from a struct to a class.
556 We also need to fix a forward declaration.
560 * platform/image-decoders/gif/GIFImageDecoder.h:
562 2013-02-11 Nico Weber <thakis@chromium.org>
564 Remove web intents code
565 https://bugs.webkit.org/show_bug.cgi?id=109501
567 Reviewed by Eric Seidel.
569 See thread "Removing ENABLE(WEB_INTENTS) code" on webkit-dev.
571 * DerivedSources.make:
572 * Modules/intents/DOMWindowIntents.cpp: Removed.
573 * Modules/intents/DOMWindowIntents.h: Removed.
574 * Modules/intents/DOMWindowIntents.idl: Removed.
575 * Modules/intents/DeliveredIntent.cpp: Removed.
576 * Modules/intents/DeliveredIntent.h: Removed.
577 * Modules/intents/DeliveredIntent.idl: Removed.
578 * Modules/intents/Intent.cpp: Removed.
579 * Modules/intents/Intent.h: Removed.
580 * Modules/intents/Intent.idl: Removed.
581 * Modules/intents/IntentRequest.cpp: Removed.
582 * Modules/intents/IntentRequest.h: Removed.
583 * Modules/intents/IntentResultCallback.h: Removed.
584 * Modules/intents/IntentResultCallback.idl: Removed.
585 * Modules/intents/NavigatorIntents.cpp: Removed.
586 * Modules/intents/NavigatorIntents.h: Removed.
587 * Modules/intents/NavigatorIntents.idl: Removed.
588 * WebCore.gyp/WebCore.gyp:
590 * bindings/generic/RuntimeEnabledFeatures.cpp:
592 * bindings/generic/RuntimeEnabledFeatures.h:
593 (RuntimeEnabledFeatures):
594 * bindings/v8/custom/V8IntentCustom.cpp: Removed.
595 * html/HTMLElementsAllInOne.cpp:
596 * html/HTMLIntentElement.cpp: Removed.
597 * html/HTMLIntentElement.h: Removed.
598 * html/HTMLIntentElement.idl: Removed.
599 * loader/EmptyClients.cpp:
600 * loader/EmptyClients.h:
601 (EmptyFrameLoaderClient):
602 * loader/FrameLoaderClient.h:
604 * page/DOMWindow.idl:
606 2013-02-11 Eric Seidel <eric@webkit.org>
608 Fix Mac build after http://trac.webkit.org/changeset/142535.
610 Unreviewed build fix.
612 * html/parser/HTMLTokenizer.h:
613 (WebCore::HTMLTokenizer::emitAndReconsumeIn):
615 2013-02-11 David Farler <dfarler@apple.com>
617 Make WebCore Derived Sources work with SDK identifiers too
618 https://bugs.webkit.org/show_bug.cgi?id=109324
620 Reviewed by Sam Weinig.
622 * WebCore.xcodeproj/project.pbxproj: Pass SDKROOT to make for DerivedSources.make
624 2013-02-11 Zhenyao Mo <zmo@google.com>
626 WEBGL_compressed_texture_s3tc extension can be enabled even when not supported
627 https://bugs.webkit.org/show_bug.cgi?id=109508
629 Reviewed by Kenneth Russell.
631 * html/canvas/WebGLRenderingContext.cpp:
633 (WebCore::WebGLRenderingContext::getExtension): Check whether the extension support is there before returning the extension pointer.
635 2013-02-11 Emil A Eklund <eae@chromium.org>
637 Change RenderFrameSet::paint to use m-rows/m_cols directly.
638 https://bugs.webkit.org/show_bug.cgi?id=108503
640 Reviewed by Eric Seidel.
642 Test: fast/frames/invalid-frameset.html
644 * rendering/RenderFrameSet.cpp:
645 (WebCore::RenderFrameSet::paint):
647 2013-02-11 Yong Li <yoli@rim.com>
649 XMLHttpRequestProgressEventThrottle::resume() always schedules timer even when unnecessary
650 https://bugs.webkit.org/show_bug.cgi?id=105348
652 Reviewed by Alexey Proskuryakov.
654 Let resume() clear the defer flag and return if there is deferred events to dispatch.
656 No new tests as this should not affect existing cross-platform behavior. It should be
657 OK as long as it doesn't break anything.
659 * xml/XMLHttpRequestProgressEventThrottle.cpp:
660 (WebCore::XMLHttpRequestProgressEventThrottle::resume):
662 2013-02-11 Eric Seidel <eric@webkit.org>
664 Fold MarkupTokenizerBase into HTMLTokenizer now that it is the only subclass
665 https://bugs.webkit.org/show_bug.cgi?id=109499
667 Reviewed by Adam Barth.
669 For great justice. And sanity.
670 Epic amount of template code deleted.
672 * GNUmakefile.list.am:
675 * WebCore.vcproj/WebCore.vcproj:
676 * WebCore.vcxproj/WebCore.vcxproj:
677 * WebCore.vcxproj/WebCore.vcxproj.filters:
678 * WebCore.xcodeproj/project.pbxproj:
679 * html/parser/HTMLTokenizer.cpp:
680 (WebCore::HTMLTokenizer::HTMLTokenizer):
681 * html/parser/HTMLTokenizer.h:
684 (WebCore::HTMLTokenizer::state):
685 (WebCore::HTMLTokenizer::setState):
686 (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
687 (WebCore::HTMLTokenizer::bufferCharacter):
688 (WebCore::HTMLTokenizer::emitAndResumeIn):
689 (WebCore::HTMLTokenizer::emitAndReconsumeIn):
690 (WebCore::HTMLTokenizer::emitEndOfFile):
691 (WebCore::HTMLTokenizer::haveBufferedCharacterToken):
692 * xml/parser/MarkupTokenizerBase.h: Removed.
694 2013-02-11 Anton Vayvod <avayvod@chromium.org>
696 [Text Autosizing] Collect narrow descendants and process them separately. Refactoring for
698 https://bugs.webkit.org/show_bug.cgi?id=109054
700 Preparational change to combine narrow descendants of the same autosizing cluster into
701 groups by the width difference between the descendant and the block containing all text of
702 the parent autosizing cluster. The groups will be autosized with the same multiplier.
704 For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
705 a large margin individually applied (via a CSS selector), causing them all to individually
706 appear narrower than their enclosing blockContainingAllText. Rather than making each of
707 these paragraphs into a separate cluster, we eventually want to be able to merge them back
708 together into one (or a few) descendant clusters.
710 Reviewed by Julien Chaffraix.
712 No behavioral changes thus no new tests or test changes.
714 * rendering/TextAutosizer.cpp:
715 (TextAutosizingClusterInfo): Vector of narrow descendants.
716 (WebCore::TextAutosizer::processCluster): Process narrow descendants separately.
717 (WebCore::TextAutosizer::processContainer):
719 Remember narrow descendants of the parent cluster for later processing.
721 2013-02-11 Enrica Casucci <enrica@apple.com>
723 Add ENABLE_DELETION_UI to control the use of the deletion UI.
724 https://bugs.webkit.org/show_bug.cgi?id=109463.
726 Reviewed by Ryosuke Niwa.
728 This patch adds #if ENABLE(DELETION_UI) in every spot where
729 DeleteButtonController is used. This class is now only instantiated
730 if the feature is enabled. I've also done some cleanup in the
731 DeleteButtonController class, removing unused methods and making
732 private some methods only used internally to the class.
733 Both DeleteButtonController and DeleteButton classes are now excluded
734 from the compilation if the feature is not enabled.
736 No new tests, no change of functionality.
738 * dom/ContainerNode.cpp:
739 (WebCore::ContainerNode::cloneChildNodes):
740 * editing/CompositeEditCommand.cpp:
741 (WebCore::EditCommandComposition::unapply):
742 (WebCore::EditCommandComposition::reapply):
743 (WebCore::CompositeEditCommand::apply):
744 * editing/DeleteButton.cpp:
745 * editing/DeleteButtonController.cpp:
746 * editing/DeleteButtonController.h: Some cleanup.
747 (WebCore::DeleteButtonController::enabled): Made private.
748 * editing/EditCommand.cpp:
749 (WebCore::EditCommand::EditCommand):
750 * editing/Editor.cpp:
751 (WebCore::Editor::notifyComponentsOnChangedSelection):
752 (WebCore::Editor::Editor):
753 (WebCore::Editor::rangeForPoint):
754 (WebCore::Editor::deviceScaleFactorChanged):
756 * editing/htmlediting.cpp: avoidIntersectionWithNode is
757 used only if the feature is enabled.
758 * editing/htmlediting.h:
759 * editing/markup.cpp:
760 (WebCore::createMarkup):
761 (WebCore::createFragmentFromNodes):
762 * rendering/RenderTable.cpp: Removed unnecessary include
763 fo DeleteButtonController.h
765 2013-02-11 Rafael Weinstein <rafaelw@chromium.org>
767 [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
768 https://bugs.webkit.org/show_bug.cgi?id=109338
770 Reviewed by Adam Barth.
772 This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
773 is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
775 Tests added to html5lib.
777 * html/parser/HTMLTreeBuilder.cpp:
779 (WebCore::HTMLTreeBuilder::popAllTemplates):
780 (WebCore::HTMLTreeBuilder::processEndTag):
781 (WebCore::HTMLTreeBuilder::processEndOfFile):
782 * html/parser/HTMLTreeBuilder.h:
785 2013-02-11 Andreas Kling <akling@apple.com>
787 RenderText::isAllCollapsibleWhitespace() shouldn't upconvert string to 16-bit.
788 <http://webkit.org/b/109354>
790 Reviewed by Eric Seidel.
792 254 KB progression on Membuster3.
794 * rendering/RenderText.cpp:
795 (WebCore::RenderText::isAllCollapsibleWhitespace):
797 2013-02-11 Alpha Lam <hclam@chromium.org>
799 Fix code style violations in GIFImageReader.{cc|h}
800 https://bugs.webkit.org/show_bug.cgi?id=109007
802 Reviewed by Stephen White.
804 This is just a style clean up for GIFImageReader.{cc|h}.
806 There's going to be a lot changes in these two files and style check
807 will add a lot of noise in later reviews. Fix style problems first.
809 There is no change in logic at all. Just style fixes.
813 * platform/image-decoders/gif/GIFImageDecoder.cpp:
814 (WebCore::GIFImageDecoder::frameCount):
815 (WebCore::GIFImageDecoder::repetitionCount):
816 (WebCore::GIFImageDecoder::haveDecodedRow):
817 (WebCore::GIFImageDecoder::initFrameBuffer):
818 * platform/image-decoders/gif/GIFImageReader.cpp:
819 (GIFImageReader::outputRow):
820 (GIFImageReader::doLZW):
821 (GIFImageReader::read):
822 * platform/image-decoders/gif/GIFImageReader.h:
824 (GIFFrameContext::GIFFrameContext):
825 (GIFFrameContext::~GIFFrameContext):
826 (GIFImageReader::GIFImageReader):
827 (GIFImageReader::~GIFImageReader):
829 (GIFImageReader::imagesCount):
830 (GIFImageReader::loopCount):
831 (GIFImageReader::globalColormap):
832 (GIFImageReader::globalColormapSize):
833 (GIFImageReader::frameContext):
835 2013-02-11 Bem Jones-Bey <bjonesbe@adobe.com>
837 [CSS Exclusions] Handle shape-outside changing a float's overhang behavior
838 https://bugs.webkit.org/show_bug.cgi?id=106927
840 Reviewed by Julien Chaffraix.
842 When the position on a shape outside causes a float to spill out into
843 another block than it's container, it was not being drawn correctly. It
844 became apparent that in order to fix this properly, the approach to
845 positioning shape outsides and floats needed to be changed. The new
846 approach also fixes some other outstanding issues, like hit detection.
848 When a float has a shape outside, inline and float layout happens
849 using the exclusion shape bounds instead of the float's box. The
850 effect of this is that the float itself no longer has any effect on
851 layout, both with respect to positioning of the float's siblings as
852 well as positioning the float's box. This means that when the float is
853 positioned, it is the shape's box that must obey the positioning rules
854 for floats. When the shape is given a position relative to the float's
855 box, the rules for float positioning determine where the shape sits
856 in the parent, causing the float's box to be offset by the position of
857 the shape. Since the float's box does not affect layout (due to the
858 shape), this is similar to relative positioning in that the offset is
859 a paint time occurrence.
861 So the new approach is to implement positioning of shape outside on
862 floats similar to how relative positioning is implemented, using a
865 This is also tested by the existing tests for shape outside on floats positioning.
867 Test: fast/exclusions/shape-outside-floats/shape-outside-floats-overhang.html
869 * rendering/ExclusionShapeOutsideInfo.h:
870 (WebCore::ExclusionShapeOutsideInfo::shapeLogicalOffset): Utility method to create a LayoutSize for computing the layer offset.
871 (ExclusionShapeOutsideInfo):
872 * rendering/LayoutState.cpp:
873 (WebCore::LayoutState::LayoutState): Check for floats with shape outside as well as in flow positioning.
874 * rendering/RenderBlock.cpp:
875 (WebCore::RenderBlock::flipFloatForWritingModeForChild): Remove old positioning implementation.
876 (WebCore::RenderBlock::paintFloats): Remove old positioning implementation.
877 (WebCore::RenderBlock::blockSelectionGaps): Check for floats with shape outside as well as in flow positioning.
878 (WebCore::RenderBlock::positionNewFloats): Remove old positioning implementation.
879 (WebCore::RenderBlock::addOverhangingFloats): Remove FIXME.
880 (WebCore::positionForPointRespectingEditingBoundaries): Check for floats with shape outside as well as in flow positioning.
881 * rendering/RenderBlock.h:
882 (RenderBlock): Remove old positioning implementation.
883 (WebCore::RenderBlock::xPositionForFloatIncludingMargin): Remove old positioning implementation.
884 (WebCore::RenderBlock::yPositionForFloatIncludingMargin): Remove old positioning implementation.
885 * rendering/RenderBox.cpp:
886 (WebCore::RenderBox::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
887 (WebCore::RenderBox::offsetFromContainer): Check for floats with shape outside as well as in flow positioning.
888 (WebCore::RenderBox::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
889 (WebCore::RenderBox::layoutOverflowRectForPropagation): Check for floats with shape outside as well as in flow positioning.
890 * rendering/RenderBox.h: Make floats with shape outside get a layer.
891 * rendering/RenderBoxModelObject.cpp:
892 (WebCore::RenderBoxModelObject::paintOffset): Method to return in flow
893 positioning offset + offset from shape outside on floats.
894 * rendering/RenderBoxModelObject.h:
895 (RenderBoxModelObject): Add paintOffset method.
896 * rendering/RenderInline.cpp:
897 (WebCore::RenderInline::clippedOverflowRectForRepaint): Check for floats with shape outside as well as in flow positioning.
898 (WebCore::RenderInline::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
899 (WebCore::RenderInline::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
900 * rendering/RenderLayer.cpp:
901 (WebCore::RenderLayer::updateLayerPosition): Check for floats with shape outside as well as in flow positioning.
902 (WebCore::RenderLayer::calculateClipRects): Check for floats with shape outside as well as in flow positioning.
903 * rendering/RenderLayer.h:
904 (WebCore::RenderLayer::paintOffset): Rename offsetForInFlowPosition to reflect that it's not just for
905 in flow positioning, it also reflects shape outside position on floats.
907 * rendering/RenderObject.h:
908 (WebCore::RenderObject::hasPaintOffset): Determines if this object is in flow positioined or is a float with shape outside.
909 * rendering/style/RenderStyle.h: Add hasPaintOffset method, analagous to method with same name on RenderObject.
911 2013-02-11 Tim Horton <timothy_horton@apple.com>
913 FrameView::setScrollPosition should clamp scroll position before handing it to
914 ScrollingCoordinator instead of depending on ScrollView to do this
915 https://bugs.webkit.org/show_bug.cgi?id=109497
916 <rdar://problem/12631789>
918 Reviewed by Simon Fraser.
920 Clamp scroll position before handing it to ScrollingCoordinator. Also, like ScrollView does,
921 bail out if we've already scrolled to the clamped scroll position.
923 Test: platform/mac-wk2/tiled-drawing/clamp-out-of-bounds-scrolls.html
925 * page/FrameView.cpp:
926 (WebCore::FrameView::setScrollPosition):
928 2013-02-11 Adam Barth <abarth@webkit.org>
930 The threaded HTML parser should pass all the fast/parser tests
931 https://bugs.webkit.org/show_bug.cgi?id=109486
933 Reviewed by Tony Gentilcore.
935 This patch fixes the last two test failures in fast/parser, which were
936 crashes caused by not having a tokenizer when document.close() was
937 called. (The tokenizer is created lazily by calls to document.write,
938 which might not happen before document.close).
940 fast/parser/document-close-iframe-load.html
941 fast/parser/document-close-nested-iframe-load.html
943 In addition, I've added a new test to make sure we flush the tokenizer
944 properly in these cases.
946 Test: fast/parser/document-close-iframe-load-partial-entity.html
948 * html/parser/HTMLDocumentParser.cpp:
949 (WebCore::HTMLDocumentParser::prepareToStopParsing):
950 (WebCore::HTMLDocumentParser::pumpTokenizer):
952 2013-02-11 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
954 [texmap] Implement frames-per-second debug counter
955 https://bugs.webkit.org/show_bug.cgi?id=107942
957 Reviewed by Noam Rosenthal.
959 Adds FPS counter via WEBKIT_SHOW_FPS=<interval> environment variable,
960 where <interval> is the period in seconds (i.e. =1.5) between FPS
961 updates on screen. It is measured by counting
962 CoordinatedGraphicsScene::paintTo* calls and is painted using
963 drawRepaintCounter() after TextureMapperLayer has finished painting its
966 Visual debugging feature, no need for new tests.
968 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
969 (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
970 (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
971 (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
972 (WebCore::CoordinatedGraphicsScene::updateFPS):
973 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
975 2013-02-11 Eric Seidel <eric@webkit.org>
977 Fold MarkupTokenBase into HTMLToken now that it has no other subclasses
978 https://bugs.webkit.org/show_bug.cgi?id=109483
980 Reviewed by Adam Barth.
982 This deletes an epic amount of template yuck, as well as removes
983 a vtable !?! from HTMLToken.
985 This paves the way for further cleanup of HTMLToken now that we
986 can see the whole object at once.
987 We'll also probably re-create an HTMLToken.cpp again, now that we're
988 free from the chains of template nonsense.
990 * GNUmakefile.list.am:
993 * WebCore.vcproj/WebCore.vcproj:
994 * WebCore.vcxproj/WebCore.vcxproj:
995 * WebCore.vcxproj/WebCore.vcxproj.filters:
996 * WebCore.xcodeproj/project.pbxproj:
997 * html/parser/HTMLToken.h:
998 (WebCore::findAttributeInVector):
1003 (WebCore::HTMLToken::HTMLToken):
1004 (WebCore::HTMLToken::clear):
1005 (WebCore::HTMLToken::isUninitialized):
1006 (WebCore::HTMLToken::type):
1007 (WebCore::HTMLToken::makeEndOfFile):
1008 (WebCore::HTMLToken::startIndex):
1009 (WebCore::HTMLToken::endIndex):
1010 (WebCore::HTMLToken::setBaseOffset):
1011 (WebCore::HTMLToken::end):
1012 (WebCore::HTMLToken::data):
1013 (WebCore::HTMLToken::isAll8BitData):
1014 (WebCore::HTMLToken::name):
1015 (WebCore::HTMLToken::appendToName):
1016 (WebCore::HTMLToken::nameString):
1017 (WebCore::HTMLToken::selfClosing):
1018 (WebCore::HTMLToken::setSelfClosing):
1019 (WebCore::HTMLToken::beginStartTag):
1020 (WebCore::HTMLToken::beginEndTag):
1021 (WebCore::HTMLToken::addNewAttribute):
1022 (WebCore::HTMLToken::beginAttributeName):
1023 (WebCore::HTMLToken::endAttributeName):
1024 (WebCore::HTMLToken::beginAttributeValue):
1025 (WebCore::HTMLToken::endAttributeValue):
1026 (WebCore::HTMLToken::appendToAttributeName):
1027 (WebCore::HTMLToken::appendToAttributeValue):
1028 (WebCore::HTMLToken::attributes):
1029 (WebCore::HTMLToken::eraseValueOfAttribute):
1030 (WebCore::HTMLToken::ensureIsCharacterToken):
1031 (WebCore::HTMLToken::characters):
1032 (WebCore::HTMLToken::appendToCharacter):
1033 (WebCore::HTMLToken::comment):
1034 (WebCore::HTMLToken::beginComment):
1035 (WebCore::HTMLToken::appendToComment):
1036 (WebCore::HTMLToken::eraseCharacters):
1037 * html/parser/HTMLTokenTypes.h:
1038 * html/parser/XSSAuditor.h:
1039 * xml/parser/MarkupTokenBase.h: Removed.
1041 2013-02-11 Gavin Barraclough <barraclough@apple.com>
1043 PluginProcess should quit immediately if idle in response to low-memory notifications
1044 https://bugs.webkit.org/show_bug.cgi?id=109103
1045 <rdar://problem/12679827>
1047 Reviewed by Brady Eidson.
1049 This patch allows a process to set a custom callback for low memory warnings
1050 (defaulting to the current behaviour, as implemented in releaseMemory).
1052 * platform/MemoryPressureHandler.cpp:
1053 (WebCore::MemoryPressureHandler::MemoryPressureHandler):
1054 - Initialize m_lowMemoryHandler to releaseMemory.
1055 (WebCore::MemoryPressureHandler::install):
1056 (WebCore::MemoryPressureHandler::uninstall):
1057 (WebCore::MemoryPressureHandler::holdOff):
1058 - Cleaned up spacing.
1059 (WebCore::MemoryPressureHandler::releaseMemory):
1060 - Added null implementation for non-Mac builds.
1061 * platform/MemoryPressureHandler.h:
1062 (WebCore::MemoryPressureHandler::setLowMemoryHandler):
1063 - Added method to set m_lowMemoryHandler.
1064 * platform/mac/MemoryPressureHandlerMac.mm:
1065 (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1066 - Changed to call releaseMemory via m_lowMemoryHandler.
1068 2013-02-11 Simon Fraser <simon.fraser@apple.com>
1070 REGRESSION (r133807): Sticky-position review bar on bugzilla review page is jumpy
1071 https://bugs.webkit.org/show_bug.cgi?id=104276
1072 <rdar://problem/12827187>
1074 Reviewed by Tim Horton.
1076 When committing new scrolling tree state, if the root node has a scroll
1077 position update, we would handle that before updating the state of child
1078 nodes (with possibly new viewport constraints). That would cause incorrect
1079 child layer updates.
1081 Fix by adding a second 'update' phase that happens after child nodes,
1082 and moving the scroll position update into that.
1084 Scrolling tests only dump the state tree, so cannot test the bug.
1086 * page/FrameView.cpp:
1087 (WebCore::FrameView::setScrollPosition): If the scroll position didn't
1088 actually change, don't request a scroll position update from the ScrollingCoordinator.
1089 * page/scrolling/ScrollingTree.cpp:
1090 (WebCore::ScrollingTree::updateTreeFromStateNode): Keep track of the scrolling node so
1091 that we can call updateAfterChildren() on it.
1092 * page/scrolling/ScrollingTreeNode.h:
1093 (ScrollingTreeNode):
1094 (WebCore::ScrollingTreeNode::updateAfterChildren):
1095 * page/scrolling/ScrollingTreeScrollingNode.cpp:
1096 (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
1097 * page/scrolling/ScrollingTreeScrollingNode.h:
1098 (ScrollingTreeScrollingNode):
1099 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1100 (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
1101 In the current bug the scrolling tree was scheduled for commit because of a
1102 scroll position request, but if only the viewport constraints change, we also need
1104 * page/scrolling/mac/ScrollingTreeFixedNode.h:
1105 (ScrollingTreeFixedNode):
1106 * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1107 (WebCore::ScrollingTreeFixedNode::updateBeforeChildren):
1108 * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
1109 (ScrollingTreeScrollingNodeMac):
1110 * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1111 (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
1112 (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren): Move code here
1113 that updates things that have to happen after children.
1114 * page/scrolling/mac/ScrollingTreeStickyNode.h:
1115 (ScrollingTreeStickyNode):
1116 * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1117 (WebCore::ScrollingTreeStickyNode::updateBeforeChildren):
1119 2013-02-11 Roger Fong <roger_fong@apple.com>
1121 Unreviewed. Build fix for Win7 Release.
1122 Because of InspectorAllInOne.cpp static globals must be named differently in files included by InspectorAllInOne.
1123 This was the case for UserInitiatedProfileName. Also removed the repeated HeapProfileType definition in
1124 InspectorHeapProfilerAgent.cpp since it wasn't being used anyways.
1126 * inspector/InspectorHeapProfilerAgent.cpp:
1128 (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
1130 2013-02-11 Tony Gentilcore <tonyg@chromium.org>
1132 SegmentedString's copy ctor should copy all fields
1133 https://bugs.webkit.org/show_bug.cgi?id=109477
1135 Reviewed by Adam Barth.
1137 This fixes http/tests/inspector-enabled/document-write.html (and likely others) for the threaded HTML parser.
1139 No new tests because covered by existing tests.
1141 * platform/text/SegmentedString.cpp:
1142 (WebCore::SegmentedString::SegmentedString):
1144 2013-02-11 Joshua Bell <jsbell@chromium.org>
1146 IndexedDB: database connections don't close after versionchange transaction aborts
1147 https://bugs.webkit.org/show_bug.cgi?id=102298
1149 Reviewed by Tony Chang.
1151 Per spec, close the database if the "versionchange" transaction aborts.
1153 Tests: storage/indexeddb/aborted-versionchange-closes.html
1154 storage/indexeddb/lazy-index-population.html
1155 storage/objectstore-basics.html
1157 * Modules/indexeddb/IDBTransaction.cpp:
1158 (WebCore::IDBTransaction::onAbort): Tell the IDBDatabase (connection) to close if
1159 this was a "versionchange" transaction.
1161 2013-02-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
1163 [EFL] fast/forms/number/number-l10n-input.html is failing
1164 https://bugs.webkit.org/show_bug.cgi?id=109440
1166 Reviewed by Laszlo Gombos.
1168 Use LocaleICU instead of LocaleNone on EFL port. The EFL
1169 port already depends on ICU library and we get additional
1170 functionality this way.
1172 No new tests, already covered by existing tests.
1175 * PlatformBlackBerry.cmake:
1176 * PlatformEfl.cmake:
1177 * PlatformWinCE.cmake:
1179 2013-02-11 Benjamin Poulain <benjamin@webkit.org>
1181 Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
1182 https://bugs.webkit.org/show_bug.cgi?id=109349
1184 Reviewed by Sam Weinig.
1186 Expose setMinimumTimerInterval() and implement the backup/restore to keep
1187 a consistent state between tests.
1189 * testing/InternalSettings.cpp:
1190 (WebCore::InternalSettings::Backup::Backup):
1191 (WebCore::InternalSettings::Backup::restoreTo):
1192 (WebCore::InternalSettings::setMinimumTimerInterval):
1194 * testing/InternalSettings.h:
1197 * testing/InternalSettings.idl:
1199 2013-02-11 Dean Jackson <dino@apple.com>
1201 Source/WebCore: Snapshotted plug-in should use shadow root
1202 https://bugs.webkit.org/show_bug.cgi?id=108284
1204 Reviewed by Simon Fraser.
1206 Take three - relanding after rollout in r142400 that was caused by a global
1207 selector interfering with CSS Instrumentation in the Inspector.
1209 A snapshotted plugin needs to indicate to the user that it can be clicked
1210 to be restarted. Previously this was done with an image that had embedded
1211 text. Instead, we now use an internal shadow root to embed some markup that
1212 will display instructions that can be localised.
1214 The UA stylesheet for plug-ins provides a default styling for the label, which
1215 can be overridden by ports.
1217 In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
1218 since it is only responsible for drawing a paused plug-in. The snapshot creation
1219 can work with the default renderer, but a shadow root requires something like
1220 RenderBlock in order to draw its children. We swap from one renderer to another when
1221 necessary either by creating the shadow root or by explicitly detaching and attaching
1224 Unfortunately this is difficult to test, because the snapshotting requires
1225 time to execute, and also a PluginView to be instantiated.
1228 (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
1230 * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
1231 * platform/LocalizedStrings.h:
1232 * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1233 * platform/chromium/LocalizedStringsChromium.cpp:
1234 * platform/efl/LocalizedStringsEfl.cpp:
1235 * platform/gtk/LocalizedStringsGtk.cpp:
1236 * platform/qt/LocalizedStringsQt.cpp:
1238 * html/HTMLPlugInElement.cpp:
1239 (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
1240 that RenderSnapshottedPlugIn no longer is an embedded object.
1242 * html/HTMLPlugInImageElement.cpp:
1243 (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
1244 (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
1245 (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
1246 (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
1247 a renderer, otherwise use the typical plug-in path.
1248 (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
1249 need to give it to the renderer.
1250 (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
1251 * html/HTMLPlugInImageElement.h:
1252 (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
1253 should show immediately.
1254 (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
1255 to swap to the Shadow Root.
1256 (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
1257 in being recreated. Make sure we reattach so that a plugin renderer will be created.
1258 (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
1259 displayState for snapshots.
1260 * html/HTMLPlugInImageElement.h:
1261 (HTMLPlugInImageElement): The new methods listed above.
1262 (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
1263 a snapshot should be immediately labeled.
1265 * page/ChromeClient.h: No need for plugInStartLabelImage any more.
1267 * rendering/RenderSnapshottedPlugIn.cpp:
1268 (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
1269 (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
1270 (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
1271 (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
1272 (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
1273 (WebCore::RenderSnapshottedPlugIn::getCursor):
1274 (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
1275 * rendering/RenderSnapshottedPlugIn.h:
1276 (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
1278 2013-02-11 Mike West <mkwst@chromium.org>
1280 CSP reports for blocked 'data:' URLs should report the scheme only.
1281 https://bugs.webkit.org/show_bug.cgi?id=109429
1283 Reviewed by Adam Barth.
1285 https://dvcs.w3.org/hg/content-security-policy/rev/001dc8e8bcc3 changed
1286 the CSP 1.1 spec to require that blocked URLs that don't refer to
1287 generally resolvable schemes (e.g. 'data:', 'javascript:', etc.) be
1288 stripped down to their scheme in violation reports.
1290 Test: http/tests/security/contentSecurityPolicy/report-blocked-data-uri.html
1292 * page/ContentSecurityPolicy.cpp:
1293 (WebCore::ContentSecurityPolicy::reportViolation):
1294 If the blocked URL is a web-resolvable scheme, apply the current
1295 stripping logic to it, otherwise, strip it to the scheme only.
1298 Move KURL::isHierarchical() out into KURL's public API.
1300 2013-02-11 Simon Fraser <simon.fraser@apple.com>
1302 ScrollingTree node maps keep getting larger
1303 https://bugs.webkit.org/show_bug.cgi?id=109348
1305 Reviewed by Sam Weinig.
1307 When navigating between pages, nodes would get left in the ScrollingTree's
1308 node map, and the ScrollingStateTree's node map, so these would get larger
1309 and larger as you browse.
1311 Simplify map maintenance by clearing the map when setting a new root node
1312 (which happens on the first commit of a new page). Also, don't keep root nodes
1313 around, but create them afresh for each page, which simplifies their ID
1316 This is closer to the original behavior; keeping the root nodes around was
1317 a fix for bug 99668, but we avoid regressing that fix by bailing early
1318 from frameViewLayoutUpdated() if there is no root state node (we'll get
1319 called again anyway).
1321 This now allows state nodeIDs to be purely read-only.
1323 * page/scrolling/ScrollingStateNode.h:
1324 * page/scrolling/ScrollingStateTree.cpp:
1325 (WebCore::ScrollingStateTree::ScrollingStateTree):
1326 (WebCore::ScrollingStateTree::attachNode):
1327 (WebCore::ScrollingStateTree::clear):
1328 (WebCore::ScrollingStateTree::removeNode):
1329 * page/scrolling/ScrollingTree.cpp:
1330 (WebCore::ScrollingTree::updateTreeFromStateNode):
1331 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1332 (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
1334 2013-02-11 Simon Fraser <simon.fraser@apple.com>
1336 Move m_stateNodeMap from ScrollingCoordinatorMac to ScrollingStateTree
1337 https://bugs.webkit.org/show_bug.cgi?id=109361
1339 Reviewed by Sam Weinig.
1341 The map of scrolling node IDs to ScollingStateNodes was maintained by
1342 ScrollingCoordinatorMac, rather than ScrollingStateTree. This is different
1343 from the ScrollingTree (which owns its node map), and added some amount
1344 of to-and-fro between ScrollingStateTree and ScrollingCoordinatorMac.
1346 Having ScrollingCoordinatorMac maintain the map of IDs to state nodes
1351 * page/scrolling/ScrollingStateTree.cpp:
1352 (WebCore::ScrollingStateTree::attachNode):
1353 (WebCore::ScrollingStateTree::detachNode):
1354 (WebCore::ScrollingStateTree::clear):
1355 (WebCore::ScrollingStateTree::removeNode):
1356 (WebCore::ScrollingStateTree::stateNodeForID):
1357 * page/scrolling/ScrollingStateTree.h:
1358 (ScrollingStateTree): Remove some stale comments.
1359 (WebCore::ScrollingStateTree::removedNodes):
1360 * page/scrolling/mac/ScrollingCoordinatorMac.h:
1361 (ScrollingCoordinatorMac):
1362 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1363 (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
1364 (WebCore::ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView):
1365 (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
1366 (WebCore::ScrollingCoordinatorMac::requestScrollPositionUpdate):
1367 (WebCore::ScrollingCoordinatorMac::attachToStateTree):
1368 (WebCore::ScrollingCoordinatorMac::detachFromStateTree):
1369 (WebCore::ScrollingCoordinatorMac::clearStateTree):
1370 (WebCore::ScrollingCoordinatorMac::updateScrollingNode):
1371 (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
1373 2013-02-11 Mark Rowe <mrowe@apple.com>
1377 * platform/mac/PlatformSpeechSynthesizerMac.mm: Fix the case in the include.
1379 2013-02-11 Julien Chaffraix <jchaffraix@webkit.org>
1381 Regression(r131539): Heap-use-after-free in WebCore::RenderBlock::willBeDestroyed
1382 https://bugs.webkit.org/show_bug.cgi?id=107189
1384 Reviewed by Abhishek Arya.
1386 Test: fast/dynamic/continuation-detach-crash.html
1388 This patch reverts r131539 and the following changes (r132591 and r139664).
1389 This means we redo detaching from the bottom-up which solves the regression.
1390 It fixes the attached test case as we re-attach child nodes before detaching
1391 the parent. It seems wrong to do but this avoid a stale continuation.
1393 * dom/ContainerNode.cpp:
1394 (WebCore::ContainerNode::detach): Detach the children first, then ourself.
1396 (WebCore::Node::detach): Clear the renderer instead of ASSERT'ing.
1397 * rendering/RenderObject.cpp:
1398 (WebCore::RenderObject::willBeDestroyed): Removed the code to clear the associated node's renderer.
1399 (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
1400 * rendering/RenderObjectChildList.cpp:
1401 (WebCore::RenderObjectChildList::removeChildNode):
1402 Moved the repainting logic back into removeChildNode from destroyAndCleanupAnonymousWrappers.
1403 (WebCore::RenderObjectChildList::destroyLeftoverChildren): Re-added the code to clear the associated node's
1405 * rendering/RenderTextFragment.cpp:
1406 (WebCore::RenderTextFragment::setText): Re-added the code to set the associated node's renderer.
1408 * dom/ContainerNode.cpp:
1409 (WebCore::ContainerNode::detach):
1411 (WebCore::Node::detach):
1412 * rendering/RenderObject.cpp:
1413 (WebCore::RenderObject::willBeDestroyed):
1414 (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
1415 * rendering/RenderObjectChildList.cpp:
1416 (WebCore::RenderObjectChildList::destroyLeftoverChildren):
1417 (WebCore::RenderObjectChildList::removeChildNode):
1418 * rendering/RenderTextFragment.cpp:
1419 (WebCore::RenderTextFragment::setText):
1421 2013-02-11 Eric Seidel <eric@webkit.org>
1423 Make WebVTTTokenizer stop inheriting from MarkupTokenizerBase
1424 https://bugs.webkit.org/show_bug.cgi?id=109411
1426 Reviewed by Adam Barth.
1428 Moved InputStreamPreprocessor into its own header file so it can be
1429 used by both WebVTTTokenizer and HTMLTokenizer.
1431 Also split out kEndOfFileMarker from InputStreamPreprocessor<T> so that
1432 it can be used w/o a specific instantiation of the template class.
1433 This also made it possible to fix three old fixmes about wanting to share
1436 Again, separating WebVTT code from Markup* base classes made it simpler
1437 at the cost of a little copy/paste code. WebVTT tokenization is remarkably
1438 simple compared to HTML.
1440 This will make it immediately possible to pull MarkupTokenizerBase up into
1441 HTMLTokenizer and further simplify the code.
1443 * GNUmakefile.list.am:
1446 * WebCore.vcproj/WebCore.vcproj:
1447 * WebCore.vcxproj/WebCore.vcxproj:
1448 * WebCore.vcxproj/WebCore.vcxproj.filters:
1449 * WebCore.xcodeproj/project.pbxproj:
1450 * html/parser/BackgroundHTMLParser.cpp:
1451 (WebCore::BackgroundHTMLParser::markEndOfFile):
1452 * html/parser/HTMLInputStream.h:
1453 (WebCore::HTMLInputStream::markEndOfFile):
1454 * html/parser/HTMLTokenizer.cpp:
1455 (WebCore::HTMLTokenizer::nextToken):
1456 * html/parser/InputStreamPreprocessor.h: Added.
1458 (InputStreamPreprocessor):
1459 (WebCore::InputStreamPreprocessor::InputStreamPreprocessor):
1460 (WebCore::InputStreamPreprocessor::nextInputCharacter):
1461 (WebCore::InputStreamPreprocessor::peek):
1462 (WebCore::InputStreamPreprocessor::advance):
1463 (WebCore::InputStreamPreprocessor::skipNextNewLine):
1464 (WebCore::InputStreamPreprocessor::reset):
1465 (WebCore::InputStreamPreprocessor::shouldTreatNullAsEndOfFileMarker):
1466 * html/track/WebVTTTokenizer.cpp:
1467 (WebCore::WebVTTTokenizer::WebVTTTokenizer):
1468 (WebCore::WebVTTTokenizer::nextToken):
1469 * html/track/WebVTTTokenizer.h:
1471 (WebCore::WebVTTTokenizer::haveBufferedCharacterToken):
1472 (WebCore::WebVTTTokenizer::bufferCharacter):
1473 (WebCore::WebVTTTokenizer::emitAndResumeIn):
1474 (WebCore::WebVTTTokenizer::emitEndOfFile):
1475 (WebCore::WebVTTTokenizer::shouldSkipNullCharacters):
1476 * xml/parser/MarkupTokenizerBase.h:
1477 (MarkupTokenizerBase):
1478 (WebCore::MarkupTokenizerBase::bufferCharacter):
1480 2013-02-11 Adam Barth <abarth@webkit.org>
1482 document.write during window.onload can trigger DumpRenderTree to dump the render tree
1483 https://bugs.webkit.org/show_bug.cgi?id=109465
1485 Reviewed by Eric Seidel.
1487 This patch is a partial revert of
1488 http://trac.webkit.org/changeset/142378. It's not safe to call
1489 checkComplete during the load event. We'll need to find another way of
1490 calling checkComplete at the right time.
1492 Test: fast/parser/document-write-during-load.html
1495 (WebCore::Document::decrementActiveParserCount):
1497 2013-02-11 Andrey Kosyakov <caseq@chromium.org>
1499 Web Inspector: Timeline: invalidate and force locations are same for Layout records caused by style recalculaiton
1500 https://bugs.webkit.org/show_bug.cgi?id=109294
1502 Reviewed by Pavel Feldman.
1504 Use the stack that caused style recalculation as a cause for relayout performed due to
1505 layout invalidation caused by style recalculation.
1507 * inspector/front-end/TimelinePresentationModel.js:
1508 (WebInspector.TimelinePresentationModel.prototype.reset):
1509 (WebInspector.TimelinePresentationModel.Record):
1511 2013-02-01 Andrey Kosyakov <caseq@chromium.org>
1513 Web Inspector: [Extension API] adjust inspectedWindow.eval() callback parameters to expose non-exceptional error
1514 https://bugs.webkit.org/show_bug.cgi?id=108640
1516 Reviewed by Vsevolod Vlasov.
1518 - only set first parameter to eval() callback iff expression successfully evaluates;
1519 - use object, not bool as second parameter;
1520 - pass exceptions and extension errors as second parameter if evaluate failed;
1521 - minor drive-by changes in ExtensionAPI utilities.
1523 * inspector/front-end/ExtensionAPI.js:
1524 (injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpression):
1525 (injectedExtensionAPI.InspectedWindow.prototype.):
1526 (injectedExtensionAPI.InspectedWindow.prototype.eval):
1527 (injectedExtensionAPI.extractCallbackArgument):
1528 * inspector/front-end/ExtensionServer.js:
1529 (WebInspector.ExtensionServer.prototype.):
1530 (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
1531 (WebInspector.ExtensionStatus):
1533 2013-02-11 Andrey Kosyakov <caseq@chromium.org>
1535 Web Inspector: [Extensions API] expose ExtensionServerClient to tests so tests use same port as extensions API
1536 https://bugs.webkit.org/show_bug.cgi?id=109443
1538 Reviewed by Vsevolod Vlasov.
1540 Promote extensionServer var to the outer closure, so it may be accessed by platform-specific (or test) code.
1542 * inspector/front-end/ExtensionAPI.js:
1543 (buildExtensionAPIInjectedScript):
1545 2013-02-11 Eric Seidel <eric@webkit.org>
1547 Move WebVTTToken off of MarkupTokenBase
1548 https://bugs.webkit.org/show_bug.cgi?id=109410
1550 Reviewed by Tony Gentilcore.
1552 This introduces a small amount of "copy/paste" code
1553 but actually makes WebVTTToken much smaller and simpler!
1554 This also frees the HTMLParser to have its Token class
1555 back to itself so we can tune it to make HTML faster.
1557 * html/track/WebVTTToken.h:
1559 (WebCore::WebVTTToken::WebVTTToken):
1560 (WebCore::WebVTTToken::appendToName):
1561 (WebCore::WebVTTToken::type):
1562 (WebCore::WebVTTToken::name):
1563 (WebCore::WebVTTToken::ensureIsCharacterToken):
1564 (WebCore::WebVTTToken::appendToCharacter):
1565 (WebCore::WebVTTToken::beginEmptyStartTag):
1566 (WebCore::WebVTTToken::beginStartTag):
1567 (WebCore::WebVTTToken::beginEndTag):
1568 (WebCore::WebVTTToken::beginTimestampTag):
1569 (WebCore::WebVTTToken::makeEndOfFile):
1570 (WebCore::WebVTTToken::clear):
1572 2013-02-11 Joshua Bell <jsbell@chromium.org>
1574 [V8] IndexedDB: Minor GC can collect IDBDatabase wrapper with versionchange handler
1575 https://bugs.webkit.org/show_bug.cgi?id=108670
1577 Reviewed by Kentaro Hara.
1579 Prevent IDBDatabase's wrapper from being GC'd while the database is open if it has
1580 listeners, as those listeners may close the database in response to events.
1582 Also, removed extraneous super-calls from hasPendingActivity() overrides.
1584 Test: storage/indexeddb/database-wrapper.html
1586 * Modules/indexeddb/IDBDatabase.cpp:
1587 (WebCore::IDBDatabase::hasPendingActivity): Implemented.
1588 * Modules/indexeddb/IDBDatabase.h: Declared.
1589 * Modules/indexeddb/IDBRequest.cpp:
1590 (WebCore::IDBRequest::hasPendingActivity): Simplified.
1591 * Modules/indexeddb/IDBTransaction.cpp:
1592 (WebCore::IDBTransaction::hasPendingActivity): Simplified.
1594 2013-02-11 Eric Seidel <eric@webkit.org>
1596 Remove AttributeBase now that NEW_XML is gone
1597 https://bugs.webkit.org/show_bug.cgi?id=109408
1599 Reviewed by Adam Barth.
1601 Just deleting code. HTMLToken::Attribute is now just
1602 the real class and not a typedef.
1604 * html/parser/CompactHTMLToken.cpp:
1605 (WebCore::CompactHTMLToken::CompactHTMLToken):
1606 * html/parser/HTMLTokenizer.cpp:
1607 (WebCore::AtomicHTMLToken::nameForAttribute):
1608 * xml/parser/MarkupTokenBase.h:
1614 2013-02-11 Eric Seidel <eric@webkit.org>
1616 Rename PreloadTask to StartTagScanner to match its purpose
1617 https://bugs.webkit.org/show_bug.cgi?id=109406
1619 Reviewed by Sam Weinig.
1621 As discussed in bug 107807.
1623 * html/parser/HTMLPreloadScanner.cpp:
1624 (WebCore::StartTagScanner::StartTagScanner):
1625 (WebCore::StartTagScanner::processAttributes):
1626 (WebCore::HTMLPreloadScanner::processToken):
1628 2013-02-11 Vsevolod Vlasov <vsevik@chromium.org>
1630 Web Inspector: WebInspector.Project refactorings.
1631 https://bugs.webkit.org/show_bug.cgi?id=109433
1633 Reviewed by Alexander Pavlov.
1635 This change prepares Workspace and Project to migration to project-per-domain mode for network based projects.
1636 Renamed WebInspector.WorkspaceProvider to WebInspector.ProjectDelegate.
1637 Renamed Project.name() to Project.id() and delegated it to project delegate.
1638 Added Project.displayName() method that is delegated to project delegate.
1639 SimpleWorkspaceProvider is now responsible for creation of SimpleWorkspaceDelegates and
1640 isolates various mappings from Project/ProjectDelegate concept.
1641 UISourceCode is now created based on path in the project.
1642 UISourceCode uri is now calculated based on project and path (right now uri is equal to path).
1645 * WebCore.vcproj/WebCore.vcproj:
1646 * inspector/compile-front-end.py:
1647 * inspector/front-end/FileSystemProjectDelegate.js: Renamed from Source/WebCore/inspector/front-end/FileSystemWorkspaceProvider.js.
1648 (WebInspector.FileSystemProjectDelegate):
1649 (WebInspector.FileSystemProjectDelegate.prototype.id):
1650 (WebInspector.FileSystemProjectDelegate.prototype.type):
1651 (WebInspector.FileSystemProjectDelegate.prototype.displayName):
1652 (WebInspector.FileSystemProjectDelegate.prototype.innerCallback):
1653 (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent):
1654 (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
1655 (WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
1656 (WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
1657 (WebInspector.FileSystemProjectDelegate.prototype._contentTypeForPath):
1658 (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
1659 (WebInspector.FileSystemProjectDelegate.prototype._populate):
1660 (WebInspector.FileSystemProjectDelegate.prototype._addFile):
1661 (WebInspector.FileSystemProjectDelegate.prototype._removeFile):
1662 (WebInspector.FileSystemProjectDelegate.prototype.reset):
1663 (WebInspector.FileSystemUtils):
1664 (WebInspector.FileSystemUtils.errorHandler):
1665 (WebInspector.FileSystemUtils.requestFileSystem):
1666 (.fileSystemLoaded):
1668 (WebInspector.FileSystemUtils.requestFilesRecursive):
1672 (WebInspector.FileSystemUtils.requestFileContent):
1673 (.fileWriterCreated.fileTruncated):
1674 (.fileWriterCreated):
1676 (WebInspector.FileSystemUtils.setFileContent):
1677 (WebInspector.FileSystemUtils._getDirectory):
1679 (WebInspector.FileSystemUtils._readDirectory):
1680 (WebInspector.FileSystemUtils._requestEntries):
1681 * inspector/front-end/IsolatedFileSystemModel.js:
1682 (WebInspector.IsolatedFileSystemModel.prototype._innerAddFileSystem):
1683 * inspector/front-end/SimpleWorkspaceProvider.js:
1684 (WebInspector.SimpleProjectDelegate):
1685 (WebInspector.SimpleProjectDelegate.prototype.id):
1686 (WebInspector.SimpleProjectDelegate.prototype.displayName):
1687 (WebInspector.SimpleProjectDelegate.prototype.requestFileContent):
1688 (WebInspector.SimpleProjectDelegate.prototype.setFileContent):
1689 (WebInspector.SimpleProjectDelegate.prototype.searchInFileContent):
1690 (WebInspector.SimpleProjectDelegate.prototype.addFile):
1691 (WebInspector.SimpleProjectDelegate.prototype._uniquePath):
1692 (WebInspector.SimpleProjectDelegate.prototype.removeFile):
1693 (WebInspector.SimpleProjectDelegate.prototype.reset):
1694 (WebInspector.SimpleWorkspaceProvider):
1695 (WebInspector.SimpleWorkspaceProvider.uriForURL):
1696 (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
1697 (WebInspector.SimpleWorkspaceProvider.prototype.addUniqueFileForURL):
1698 (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
1699 (WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
1700 (WebInspector.SimpleWorkspaceProvider.prototype.reset):
1701 * inspector/front-end/UISourceCode.js:
1702 (WebInspector.UISourceCode):
1703 (WebInspector.UISourceCode.prototype.path):
1704 (WebInspector.UISourceCode.prototype.uri):
1705 * inspector/front-end/WebKit.qrc:
1706 * inspector/front-end/Workspace.js:
1707 (WebInspector.FileDescriptor):
1708 (WebInspector.ProjectDelegate):
1709 (WebInspector.ProjectDelegate.prototype.id):
1710 (WebInspector.ProjectDelegate.prototype.displayName):
1711 (WebInspector.ProjectDelegate.prototype.requestFileContent):
1712 (WebInspector.ProjectDelegate.prototype.setFileContent):
1713 (WebInspector.ProjectDelegate.prototype.searchInFileContent):
1714 (WebInspector.Project):
1715 (WebInspector.Project.prototype.id):
1716 (WebInspector.Project.prototype.type):
1717 (WebInspector.Project.prototype.displayName):
1718 (WebInspector.Project.prototype.isServiceProject):
1719 (WebInspector.Project.prototype._fileAdded):
1720 (WebInspector.Project.prototype._fileRemoved):
1721 (WebInspector.Project.prototype._reset):
1722 (WebInspector.Project.prototype.uiSourceCode):
1723 (WebInspector.Project.prototype.uiSourceCodeForOriginURL):
1724 (WebInspector.Project.prototype.uiSourceCodeForURI):
1725 (WebInspector.Project.prototype.uiSourceCodes):
1726 (WebInspector.Project.prototype.requestFileContent):
1727 (WebInspector.Project.prototype.setFileContent):
1728 (WebInspector.Project.prototype.searchInFileContent):
1729 (WebInspector.Project.prototype.dispose):
1730 (WebInspector.Workspace.prototype.uiSourceCode):
1731 (WebInspector.Workspace.prototype.uiSourceCodeForURI):
1732 (WebInspector.Workspace.prototype.addProject):
1733 (WebInspector.Workspace.prototype.removeProject):
1734 (WebInspector.Workspace.prototype.project):
1735 (WebInspector.Workspace.prototype.uiSourceCodes):
1736 (WebInspector.Workspace.prototype.projectForUISourceCode):
1737 * inspector/front-end/inspector.html:
1739 2013-02-11 Yury Semikhatsky <yurys@chromium.org>
1741 Web Inspector: fix closure compiler warnings in the profiler code
1742 https://bugs.webkit.org/show_bug.cgi?id=109432
1744 Reviewed by Pavel Feldman.
1746 Updated type annotations to match the code.
1748 * inspector/front-end/NativeMemorySnapshotView.js:
1749 * inspector/front-end/ProfilesPanel.js:
1751 2013-02-11 Alexander Shalamov <alexander.shalamov@intel.com>
1753 [QT] Regression (r142444): Broke qt linux minimal build
1754 https://bugs.webkit.org/show_bug.cgi?id=109423
1756 Reviewed by Kenneth Rohde Christiansen.
1758 Test: cssom/cssvalue-comparison.html
1761 (WebCore::CSSValue::equals):
1763 2013-02-11 Andrey Lushnikov <lushnikov@chromium.org>
1765 Web Inspector: introduce WebInspector.TextUtils
1766 https://bugs.webkit.org/show_bug.cgi?id=109289
1768 Reviewed by Pavel Feldman.
1770 Add new WebInspector.TextUtils file and extract commonly used
1771 text-operation subroutines from DefaultTextEditor into it.
1773 No new tests: no change in behaviour.
1776 * WebCore.vcproj/WebCore.vcproj:
1777 * inspector/compile-front-end.py:
1778 * inspector/front-end/DefaultTextEditor.js:
1779 (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._isWord):
1780 (WebInspector.DefaultTextEditor.WordMovementController.prototype._rangeForCtrlArrowMove):
1781 (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
1782 * inspector/front-end/TextUtils.js: Added.
1783 (WebInspector.TextUtils.isStopChar):
1784 (WebInspector.TextUtils.isWordChar):
1785 (WebInspector.TextUtils.isSpaceChar):
1786 (WebInspector.TextUtils.isWord):
1787 (WebInspector.TextUtils.isBraceChar):
1788 * inspector/front-end/WebKit.qrc:
1789 * inspector/front-end/inspector.html:
1791 2013-02-11 Zan Dobersek <zdobersek@igalia.com>
1793 [GTK][Clang] Build errors in LocalizedStringsGtk.cpp
1794 https://bugs.webkit.org/show_bug.cgi?id=109418
1796 Reviewed by Philippe Normand.
1798 Use the C++ isfinite(float) and abs(float) (instead of fabsf(float))
1799 methods by including the WTF MathExtras.h header. Use a static cast to
1800 an integer type on the float return value of the abs(float) method call
1801 instead of the C-style cast.
1803 No new tests - no new functiolnality.
1805 * platform/gtk/LocalizedStringsGtk.cpp:
1806 (WebCore::localizedMediaTimeDescription):
1808 2013-02-11 Zan Dobersek <zdobersek@igalia.com>
1810 Unreviewed build fix for the WTFURL backend of KURL.
1812 * platform/KURL.cpp:
1813 (WebCore::KURL::isSafeToSendToAnotherThread): m_urlImpl is of RefPtr type so use
1814 the appropriate operator on it when calling the isSafeToSendToAnotherThread method.
1816 2013-02-11 Mike West <mkwst@chromium.org>
1818 Range::collapsed callers should explicitly ASSERT_NO_EXCEPTION.
1819 https://bugs.webkit.org/show_bug.cgi?id=108921
1821 Reviewed by Jochen Eisinger.
1823 For clarity and consistency, this patch adjusts Range::collapsed() to
1824 drop the default value of the ExceptionCode parameter it accepts. The
1825 three call sites that called the method with no arguments (all part of
1826 Editor::rangeOfString) will now explicitly ASSERT_NO_EXCEPTION.
1830 * editing/Editor.cpp:
1831 (WebCore::Editor::rangeOfString):
1833 2013-02-11 Alexei Filippov <alph@chromium.org>
1835 Web Inspector: Split Profiler domain in protocol into Profiler and HeapProfiler
1836 https://bugs.webkit.org/show_bug.cgi?id=108653
1838 Reviewed by Yury Semikhatsky.
1840 Currently CPU and heap profilers share the same domain 'Profiler' in the protocol.
1841 In fact these two profile types have not too much in common. So put each into its own domain.
1842 It should also help when Profiles panel gets split into several tools.
1843 This is the phase 1 which adds InspectorHeapProfilerAgent but doesn't
1844 change the original InspectorProfilerAgent.
1847 * GNUmakefile.list.am:
1850 * WebCore.vcproj/WebCore.vcproj:
1851 * WebCore.vcxproj/WebCore.vcxproj:
1852 * WebCore.vcxproj/WebCore.vcxproj.filters:
1853 * WebCore.xcodeproj/project.pbxproj:
1854 * inspector/Inspector.json:
1855 * inspector/InspectorAllInOne.cpp:
1856 * inspector/InspectorController.cpp:
1857 (WebCore::InspectorController::InspectorController):
1858 * inspector/InspectorHeapProfilerAgent.cpp: Added.
1860 (WebCore::InspectorHeapProfilerAgent::create):
1861 (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
1862 (WebCore::InspectorHeapProfilerAgent::~InspectorHeapProfilerAgent):
1863 (WebCore::InspectorHeapProfilerAgent::resetState):
1864 (WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
1865 (WebCore::InspectorHeapProfilerAgent::setFrontend):
1866 (WebCore::InspectorHeapProfilerAgent::clearFrontend):
1867 (WebCore::InspectorHeapProfilerAgent::restore):
1868 (WebCore::InspectorHeapProfilerAgent::collectGarbage):
1869 (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
1870 (WebCore::InspectorHeapProfilerAgent::hasHeapProfiler):
1871 (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
1872 (WebCore::InspectorHeapProfilerAgent::getHeapSnapshot):
1873 (WebCore::InspectorHeapProfilerAgent::removeProfile):
1874 (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
1875 (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
1876 (WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
1877 (WebCore::InspectorHeapProfilerAgent::reportMemoryUsage):
1878 * inspector/InspectorHeapProfilerAgent.h: Added.
1880 (InspectorHeapProfilerAgent):
1881 (WebCore::InspectorHeapProfilerAgent::clearProfiles):
1882 * inspector/InspectorInstrumentation.cpp:
1884 (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1885 * inspector/InstrumentingAgents.h:
1887 (InstrumentingAgents):
1888 (WebCore::InstrumentingAgents::inspectorHeapProfilerAgent):
1889 (WebCore::InstrumentingAgents::setInspectorHeapProfilerAgent):
1890 * inspector/WorkerInspectorController.cpp:
1891 (WebCore::WorkerInspectorController::WorkerInspectorController):
1892 * inspector/front-end/HeapSnapshotDataGrids.js:
1893 * inspector/front-end/HeapSnapshotGridNodes.js:
1894 (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent):
1895 * inspector/front-end/HeapSnapshotView.js:
1896 (WebInspector.HeapProfileHeader.prototype.startSnapshotTransfer):
1897 (WebInspector.HeapProfileHeader.prototype.saveToFile.onOpen):
1898 (WebInspector.HeapProfileHeader.prototype.saveToFile):
1899 * inspector/front-end/ProfilesPanel.js:
1900 (WebInspector.ProfilesPanel):
1901 (WebInspector.ProfilesPanel.prototype._clearProfiles):
1902 (WebInspector.ProfilesPanel.prototype._garbageCollectButtonClicked):
1903 (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
1904 (WebInspector.ProfilesPanel.prototype._populateProfiles.var):
1905 (WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback):
1906 (WebInspector.ProfilesPanel.prototype._populateProfiles):
1907 (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
1908 (WebInspector.ProfilesPanel.prototype.revealInView):
1909 (WebInspector.HeapProfilerDispatcher):
1910 (WebInspector.HeapProfilerDispatcher.prototype.addProfileHeader):
1911 (WebInspector.HeapProfilerDispatcher.prototype.addHeapSnapshotChunk):
1912 (WebInspector.HeapProfilerDispatcher.prototype.finishHeapSnapshot):
1913 (WebInspector.HeapProfilerDispatcher.prototype.resetProfiles):
1914 (WebInspector.HeapProfilerDispatcher.prototype.reportHeapSnapshotProgress):
1915 * inspector/front-end/TimelinePanel.js:
1916 (WebInspector.TimelinePanel.prototype._garbageCollectButtonClicked):
1917 * inspector/front-end/inspector.js:
1918 (WebInspector.doLoadedDone):
1920 2013-02-11 Mike West <mkwst@chromium.org>
1922 Use IGNORE_EXCEPTION for Editor::countMatchesForText's ignored exceptions.
1923 https://bugs.webkit.org/show_bug.cgi?id=109372
1925 Reviewed by Jochen Eisinger.
1927 Rather than implicitly ignoring exceptions, we should use the
1928 IGNORE_EXCEPTION macro for clarity.
1930 * editing/Editor.cpp:
1931 (WebCore::Editor::countMatchesForText):
1933 2013-02-11 Zoltan Arvai <zarvai@inf.u-szeged.hu>
1935 [Qt] Unreviewed. Fix minimal build after r142444.
1938 (WebCore::CSSValue::equals):
1940 2013-02-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
1942 [EFL] Stop using smart pointers for Ecore_Timer
1943 https://bugs.webkit.org/show_bug.cgi?id=109409
1945 Reviewed by Kenneth Rohde Christiansen.
1947 Stop using a smart pointer for Ecore_Timer in RunLoop::TimerBase. This
1948 is a bad idea because the timer handle becomes invalid as soon as the
1949 timer callback returns ECORE_CALLBACK_CANCEL. This may lead to crashes
1950 on destruction because OwnPtr calls ecore_timer_del() on an invalid
1953 No new tests, already covered by exiting tests.
1955 * platform/RunLoop.h:
1957 * platform/efl/RunLoopEfl.cpp:
1958 (WebCore::RunLoop::TimerBase::timerFired):
1959 (WebCore::RunLoop::TimerBase::start):
1960 (WebCore::RunLoop::TimerBase::stop):
1962 2013-02-11 Vladislav Kaznacheev <kaznacheev@chromium.org>
1964 Web Inspector: Allow SplitView to keep the sidebar size as a fraction of the container size
1965 https://bugs.webkit.org/show_bug.cgi?id=109414
1967 Reviewed by Vsevolod Vlasov.
1969 SplitView now interprets defaultSidebarWidth and defaultSidebarHeight values between 0 and 1 as
1970 fractions of the total container size. The sidebar then will grow or shrink along with the container.
1971 When the sidebar is resized manually the updated ratio is stored in the settings.
1973 * inspector/front-end/SplitView.js:
1974 (WebInspector.SplitView):
1975 (WebInspector.SplitView.prototype._removeAllLayoutProperties):
1976 (WebInspector.SplitView.prototype._updateTotalSize):
1977 (WebInspector.SplitView.prototype._innerSetSidebarSize):
1978 (WebInspector.SplitView.prototype._saveSidebarSize):
1980 2013-02-11 Pavel Feldman <pfeldman@chromium.org>
1982 Web Inspector: highlight DOM nodes on hover while debugging
1983 https://bugs.webkit.org/show_bug.cgi?id=109355
1985 Reviewed by Vsevolod Vlasov.
1987 Along with showing the popover, highlight the remote object as node.
1989 * inspector/front-end/ObjectPopoverHelper.js:
1990 (WebInspector.ObjectPopoverHelper.prototype.):
1991 (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
1992 (WebInspector.ObjectPopoverHelper.prototype._onHideObjectPopover):
1994 2013-02-11 Andrey Lushnikov <lushnikov@chromium.org>
1996 Web Inspector: displaying whitespace characters is broken
1997 https://bugs.webkit.org/show_bug.cgi?id=109412
1999 Reviewed by Vsevolod Vlasov.
2001 Add "pointer-events: none" rule for pseudo-class "before", which
2002 maintains rendering of whitespace characters.
2006 * inspector/front-end/inspectorSyntaxHighlight.css:
2007 (.webkit-whitespace::before):
2009 2013-02-11 Alexander Pavlov <apavlov@chromium.org>
2011 Web Inspector: Implement position-based sourcemapping for stylesheets
2012 https://bugs.webkit.org/show_bug.cgi?id=109168
2014 Reviewed by Vsevolod Vlasov.
2016 This change introduces support for position-based source maps for CSS stylesheets.
2017 Sourcemaps and originating resources (sass, scss, etc.) are loaded synchronously
2018 upon the CSS UISourceCode addition. RangeBasedSourceMap is removed as it is not used.
2020 Test: http/tests/inspector/stylesheet-source-mapping.html
2022 * inspector/front-end/CSSStyleModel.js:
2023 (WebInspector.CSSStyleModel):
2024 (WebInspector.CSSStyleModel.prototype.setSourceMapping):
2025 (WebInspector.CSSStyleModel.prototype.rawLocationToUILocation):
2026 (WebInspector.CSSStyleModel.LiveLocation.prototype.uiLocation):
2027 (WebInspector.CSSLocation):
2028 (WebInspector.CSSProperty):
2029 (WebInspector.CSSProperty.parsePayload):
2030 * inspector/front-end/CompilerScriptMapping.js:
2031 (WebInspector.CompilerScriptMapping):
2032 (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
2033 (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
2034 * inspector/front-end/SASSSourceMapping.js:
2035 (WebInspector.SASSSourceMapping):
2036 (WebInspector.SASSSourceMapping.prototype._styleSheetChanged.callback):
2037 (WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
2038 (WebInspector.SASSSourceMapping.prototype._reloadCSS):
2039 (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
2040 (WebInspector.SASSSourceMapping.prototype._resourceAdded):
2041 (WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
2042 (WebInspector.SASSSourceMapping.prototype.loadSourceMapForStyleSheet):
2043 (WebInspector.SASSSourceMapping.prototype._bindUISourceCode):
2044 (WebInspector.SASSSourceMapping.prototype.rawLocationToUILocation):
2045 (WebInspector.SASSSourceMapping.prototype.uiLocationToRawLocation):
2046 (WebInspector.SASSSourceMapping.prototype._reset):
2047 * inspector/front-end/SourceMap.js:
2048 (WebInspector.SourceMap):
2049 (WebInspector.SourceMap.load):
2050 (WebInspector.SourceMap.prototype.findEntry):
2051 (WebInspector.SourceMap.prototype.findEntryReversed):
2052 (WebInspector.SourceMap.prototype._parseMap):
2053 * inspector/front-end/StylesSourceMapping.js:
2054 (WebInspector.StylesSourceMapping):
2055 (WebInspector.StylesSourceMapping.prototype._bindUISourceCode):
2056 * inspector/front-end/inspector.js:
2058 2013-02-11 Alexander Shalamov <alexander.shalamov@intel.com>
2060 Implement CSSValue::equals(const CSSValue&) to optimise CSSValue comparison
2061 https://bugs.webkit.org/show_bug.cgi?id=102901
2063 Reviewed by Antti Koivisto.
2065 Added comparison method to CSSValue and its children, so that the
2066 css values could be compared efficiently. Before this patch, CSSValue
2067 objects were compared using strings that were generated by the cssText() method.
2069 Test: cssom/cssvalue-comparison.html
2071 * css/CSSAspectRatioValue.cpp:
2072 (WebCore::CSSAspectRatioValue::equals):
2074 * css/CSSAspectRatioValue.h:
2075 (CSSAspectRatioValue):
2076 * css/CSSBasicShapes.cpp:
2077 (WebCore::CSSBasicShapeRectangle::equals):
2079 (WebCore::CSSBasicShapeCircle::equals):
2080 (WebCore::CSSBasicShapeEllipse::equals):
2081 (WebCore::CSSBasicShapePolygon::equals):
2082 * css/CSSBasicShapes.h:
2083 (CSSBasicShapeRectangle):
2084 (CSSBasicShapeCircle):
2085 (CSSBasicShapeEllipse):
2086 (CSSBasicShapePolygon):
2087 * css/CSSBorderImageSliceValue.cpp:
2088 (WebCore::CSSBorderImageSliceValue::equals):
2090 * css/CSSBorderImageSliceValue.h:
2091 (CSSBorderImageSliceValue):
2092 * css/CSSCalculationValue.cpp:
2093 (WebCore::CSSCalcValue::equals):
2095 (WebCore::CSSCalcPrimitiveValue::equals):
2096 (CSSCalcPrimitiveValue):
2097 (WebCore::CSSCalcPrimitiveValue::type):
2098 (WebCore::CSSCalcBinaryOperation::equals):
2099 (CSSCalcBinaryOperation):
2100 (WebCore::CSSCalcBinaryOperation::type):
2101 * css/CSSCalculationValue.h:
2102 (WebCore::CSSCalcExpressionNode::equals):
2103 (CSSCalcExpressionNode):
2105 * css/CSSCanvasValue.cpp:
2106 (WebCore::CSSCanvasValue::equals):
2108 * css/CSSCanvasValue.h:
2110 * css/CSSComputedStyleDeclaration.cpp:
2111 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2112 (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
2113 (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
2114 * css/CSSCrossfadeValue.cpp:
2115 (WebCore::CSSCrossfadeValue::equals):
2117 * css/CSSCrossfadeValue.h:
2118 (CSSCrossfadeValue):
2119 * css/CSSCursorImageValue.cpp:
2120 (WebCore::CSSCursorImageValue::equals):
2122 * css/CSSCursorImageValue.h:
2123 (CSSCursorImageValue):
2124 * css/CSSFontFaceSrcValue.cpp:
2125 (WebCore::CSSFontFaceSrcValue::equals):
2127 * css/CSSFontFaceSrcValue.h:
2128 (CSSFontFaceSrcValue):
2129 * css/CSSFunctionValue.cpp:
2130 (WebCore::CSSFunctionValue::equals):
2132 * css/CSSFunctionValue.h:
2134 * css/CSSGradientValue.cpp:
2135 (WebCore::CSSLinearGradientValue::equals):
2137 (WebCore::CSSRadialGradientValue::equals):
2138 * css/CSSGradientValue.h:
2139 (WebCore::CSSGradientColorStop::operator==):
2140 (CSSLinearGradientValue):
2141 (CSSRadialGradientValue):
2142 * css/CSSImageValue.cpp:
2143 (WebCore::CSSImageValue::equals):
2145 * css/CSSImageValue.h:
2147 * css/CSSInheritedValue.h:
2148 (WebCore::CSSInheritedValue::equals):
2149 (CSSInheritedValue):
2150 * css/CSSInitialValue.h:
2151 (WebCore::CSSInitialValue::equals):
2153 * css/CSSLineBoxContainValue.h:
2154 (WebCore::CSSLineBoxContainValue::equals):
2155 * css/CSSPrimitiveValue.cpp:
2156 (WebCore::CSSPrimitiveValue::equals):
2158 * css/CSSPrimitiveValue.h:
2159 (CSSPrimitiveValue):
2160 * css/CSSReflectValue.cpp:
2161 (WebCore::CSSReflectValue::equals):
2163 * css/CSSReflectValue.h:
2165 * css/CSSTimingFunctionValue.cpp:
2166 (WebCore::CSSCubicBezierTimingFunctionValue::equals):
2168 (WebCore::CSSStepsTimingFunctionValue::equals):
2169 * css/CSSTimingFunctionValue.h:
2170 (WebCore::CSSLinearTimingFunctionValue::equals):
2171 (CSSLinearTimingFunctionValue):
2172 (CSSCubicBezierTimingFunctionValue):
2173 (CSSStepsTimingFunctionValue):
2174 * css/CSSUnicodeRangeValue.cpp:
2175 (WebCore::CSSUnicodeRangeValue::equals):
2177 * css/CSSUnicodeRangeValue.h:
2178 (CSSUnicodeRangeValue):
2181 (WebCore::compareCSSValues):
2182 (WebCore::CSSValue::equals):
2186 (WebCore::compareCSSValueVector):
2187 (WebCore::compareCSSValuePtr):
2188 * css/CSSValueList.cpp:
2189 (WebCore::CSSValueList::removeAll):
2190 (WebCore::CSSValueList::hasValue):
2191 (WebCore::CSSValueList::equals):
2193 * css/CSSValueList.h:
2195 * css/CSSVariableValue.h:
2196 (WebCore::CSSVariableValue::equals):
2200 (WebCore::Counter::equals):
2201 * css/DashboardRegion.h:
2202 (WebCore::DashboardRegion::equals):
2203 * css/FontFeatureValue.cpp:
2204 (WebCore::FontFeatureValue::equals):
2206 * css/FontFeatureValue.h:
2208 * css/FontValue.cpp:
2209 (WebCore::FontValue::equals):
2213 * css/MediaQueryExp.h:
2214 (WebCore::MediaQueryExp::operator==):
2216 (WebCore::Pair::equals):
2219 (WebCore::RectBase::equals):
2221 * css/ShadowValue.cpp:
2222 (WebCore::ShadowValue::equals):
2224 * css/ShadowValue.h:
2226 * css/StylePropertySet.cpp:
2227 (WebCore::StylePropertySet::get4Values):
2228 (WebCore::StylePropertySet::propertyMatches):
2229 * css/WebKitCSSArrayFunctionValue.cpp:
2230 (WebCore::WebKitCSSArrayFunctionValue::equals):
2232 * css/WebKitCSSArrayFunctionValue.h:
2233 (WebKitCSSArrayFunctionValue):
2234 * css/WebKitCSSFilterValue.cpp:
2235 (WebCore::WebKitCSSFilterValue::equals):
2237 * css/WebKitCSSFilterValue.h:
2238 (WebKitCSSFilterValue):
2239 * css/WebKitCSSMixFunctionValue.cpp:
2240 (WebCore::WebKitCSSMixFunctionValue::equals):
2242 * css/WebKitCSSMixFunctionValue.h:
2243 (WebKitCSSMixFunctionValue):
2244 * css/WebKitCSSSVGDocumentValue.cpp:
2245 (WebCore::WebKitCSSSVGDocumentValue::equals):
2247 * css/WebKitCSSSVGDocumentValue.h:
2248 (WebKitCSSSVGDocumentValue):
2249 * css/WebKitCSSShaderValue.cpp:
2250 (WebCore::WebKitCSSShaderValue::equals):
2252 * css/WebKitCSSShaderValue.h:
2253 (WebKitCSSShaderValue):
2254 * css/WebKitCSSTransformValue.h:
2255 (WebCore::WebKitCSSTransformValue::equals):
2256 * editing/EditingStyle.cpp:
2257 (WebCore::HTMLAttributeEquivalent::valueIsPresentInStyle):
2259 (WebCore::SVGColor::equals):
2264 (WebCore::SVGPaint::equals):
2269 2013-02-11 Pan Deng <pan.deng@intel.com>
2271 [Web Inspector] Network panel, sort by "transferSize" instead of "resourceSize".
2272 https://bugs.webkit.org/show_bug.cgi?id=109142.
2274 Reviewed by Vsevolod Vlasov.
2276 Sort by "transferSize" as it is the primary rather than "resoureSize".
2280 * inspector/front-end/NetworkPanel.js:
2281 (WebInspector.NetworkDataGridNode.SizeComparator):
2283 2013-02-11 Eugene Klyuchnikov <eustas@chromium.org>
2285 Web Inspector: [Resources] Prefactorings in DataGrid and CookieTable
2286 https://bugs.webkit.org/show_bug.cgi?id=109141
2288 Reviewed by Vsevolod Vlasov.
2290 1) Make deleteCookie method static and move to WebInspector.Cookie
2291 2) Replace resfreshCallback getter/setter in DataGrid with
2292 constructor parameter
2294 * inspector/front-end/CookieItemsView.js: Adopt changes.
2295 * inspector/front-end/CookieParser.js:
2296 (WebInspector.Cookie.prototype.remove): Moved from CookiesTable.
2297 * inspector/front-end/CookiesTable.js: Adopt changes.
2298 * inspector/front-end/DataGrid.js:
2299 Replace setter with constructor parameter.
2301 2013-02-11 John J. Barton <johnjbarton@chromium.org>
2303 Web Inspector: Don't throw exceptions in WebInspector.Color
2304 https://bugs.webkit.org/show_bug.cgi?id=104835
2306 Reviewed by Vsevolod Vlasov.
2308 WebInspector.Color.parse() returns a Color from a string, or null;
2309 Ctor calls now call parse();
2310 In the StylesSideBarPane, test null rather than catch(e).
2312 Added case to inspector/styles/styles-invalid-color-values.html
2314 * inspector/front-end/Color.js:
2315 (WebInspector.Color):
2316 (WebInspector.Color.parse):
2317 (WebInspector.Color.fromRGBA):
2318 (WebInspector.Color.fromRGB):
2319 (WebInspector.Color.prototype.toString):
2320 (WebInspector.Color.prototype._parse.this.alpha.set 0):
2321 (WebInspector.Color.prototype._parse.this.nickname.set 2):
2322 (WebInspector.Color.prototype._parse.this.hsla.set 1):
2323 (WebInspector.Color.prototype._parse.this.rgba.set 0):
2324 (WebInspector.Color.prototype._parse.set WebInspector):
2325 (WebInspector.Color.prototype._parse):
2326 * inspector/front-end/Spectrum.js:
2327 (WebInspector.Spectrum.prototype.get color):
2328 * inspector/front-end/StylesSidebarPane.js:
2330 2013-02-11 Andrey Lushnikov <lushnikov@chromium.org>
2332 Web Inspector: home button behaviour is wrong in DTE
2333 https://bugs.webkit.org/show_bug.cgi?id=109154
2335 Reviewed by Vsevolod Vlasov.
2337 Handle home key shortcut explicitly in TextEditorMainPanel.
2339 New test: inspector/editor/text-editor-home-button.html
2341 * inspector/front-end/DefaultTextEditor.js:
2342 (WebInspector.TextEditorMainPanel.prototype._registerShortcuts):
2343 (WebInspector.TextEditorMainPanel.prototype._handleHomeKey):
2345 2013-02-11 Abhishek Arya <inferno@chromium.org>
2347 Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
2348 https://bugs.webkit.org/show_bug.cgi?id=108981
2350 Reviewed by Eric Seidel.
2352 * Modules/mediastream/RTCStatsResponse.cpp:
2353 (WebCore::RTCStatsResponse::addElement):
2354 (WebCore::RTCStatsResponse::addStatistic):
2355 * Modules/websockets/WebSocketChannel.cpp:
2356 (WebCore::WebSocketChannel::skipBuffer):
2357 * css/CSSCalculationValue.cpp:
2358 (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
2359 (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
2360 * css/WebKitCSSTransformValue.cpp:
2361 (WebCore::transformValueToCssString):
2362 * editing/TextIterator.cpp:
2363 (WebCore::SearchBuffer::search):
2364 * html/HTMLElement.cpp:
2365 (WebCore::parseColorStringWithCrazyLegacyRules):
2366 * html/ImageData.cpp:
2367 (WebCore::ImageData::ImageData):
2368 * html/shadow/DateTimeSymbolicFieldElement.cpp:
2369 (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
2370 * html/track/TextTrackCueList.cpp:
2371 (WebCore::TextTrackCueList::add):
2372 * platform/SharedBuffer.cpp:
2373 (WebCore::SharedBuffer::getSomeData):
2374 * platform/SharedBufferChunkReader.cpp:
2375 (WebCore::SharedBufferChunkReader::nextChunk):
2376 * platform/audio/HRTFDatabase.cpp:
2377 (WebCore::HRTFDatabase::getKernelsFromAzimuthElevation):
2378 * platform/graphics/GlyphPageTreeNode.cpp:
2379 (WebCore::GlyphPageTreeNode::initializePage):
2380 * platform/graphics/Region.cpp:
2381 (WebCore::Region::Shape::segments_end):
2382 * platform/graphics/filters/FEComponentTransfer.cpp:
2383 (WebCore::FEComponentTransfer::getValues):
2384 * platform/graphics/filters/FilterEffect.cpp:
2385 (WebCore::FilterEffect::inputEffect):
2386 * platform/text/TextCodecUTF8.cpp:
2387 (WebCore::TextCodecUTF8::decode):
2388 * platform/text/mac/TextCodecMac.cpp:
2389 (WebCore::TextCodecMac::decode):
2390 * rendering/RenderBlockLineLayout.cpp:
2391 (WebCore::RenderBlock::checkFloatsInCleanLine):
2392 * svg/SVGAnimatedTypeAnimator.h:
2393 (WebCore::SVGAnimatedTypeAnimator::executeAction):
2394 * svg/SVGAnimationElement.cpp:
2395 (WebCore::SVGAnimationElement::calculatePercentForSpline):
2396 * svg/animation/SVGSMILElement.cpp:
2397 (WebCore::SVGSMILElement::findInstanceTime):
2399 2013-02-10 Chris Fleizach <cfleizach@apple.com>
2401 WebSpeech: Implement basic speaking/finished speaking behavior
2402 https://bugs.webkit.org/show_bug.cgi?id=107135
2404 Reviewed by Sam Weinig.
2406 Implements the basic functionality of speaking utterances.
2408 In the WebCore side, it manages the speech queue the way the spec defines
2409 (that is, new jobs are appended to a queue and wait for other jobs to finish).
2411 On the Mac side, it instantiates a synthesizer and handles the callbacks for when
2412 jobs are finished. It sends those jobs back to WebCore to dispatch the right events.
2414 Test: platform/mac/fast/speechsynthesis/speech-synthesis-speak.html
2416 * Modules/speech/SpeechSynthesis.cpp:
2417 (WebCore::SpeechSynthesis::SpeechSynthesis):
2418 (WebCore::SpeechSynthesis::paused):
2419 (WebCore::SpeechSynthesis::startSpeakingImmediately):
2420 (WebCore::SpeechSynthesis::speak):
2422 (WebCore::SpeechSynthesis::fireEvent):
2423 (WebCore::SpeechSynthesis::handleSpeakingCompleted):
2424 (WebCore::SpeechSynthesis::didStartSpeaking):
2425 (WebCore::SpeechSynthesis::didFinishSpeaking):
2426 (WebCore::SpeechSynthesis::speakingErrorOccurred):
2427 * Modules/speech/SpeechSynthesis.h:
2429 (WebCore::SpeechSynthesis::speaking):
2431 * Modules/speech/SpeechSynthesisEvent.cpp:
2432 (WebCore::SpeechSynthesisEvent::create):
2434 (WebCore::SpeechSynthesisEvent::SpeechSynthesisEvent):
2435 * Modules/speech/SpeechSynthesisEvent.h:
2436 (SpeechSynthesisEvent):
2437 (WebCore::SpeechSynthesisEvent::interfaceName):
2438 * Modules/speech/SpeechSynthesisUtterance.h:
2439 (WebCore::SpeechSynthesisUtterance::startTime):
2440 (WebCore::SpeechSynthesisUtterance::setStartTime):
2441 (SpeechSynthesisUtterance):
2442 * platform/PlatformSpeechSynthesisUtterance.cpp:
2443 (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
2444 * platform/PlatformSpeechSynthesisUtterance.h:
2445 (PlatformSpeechSynthesisUtterance):
2446 (WebCore::PlatformSpeechSynthesisUtterance::setVolume):
2447 (WebCore::PlatformSpeechSynthesisUtterance::setRate):
2448 (WebCore::PlatformSpeechSynthesisUtterance::setPitch):
2449 (WebCore::PlatformSpeechSynthesisUtterance::startTime):
2450 (WebCore::PlatformSpeechSynthesisUtterance::setStartTime):
2451 (WebCore::PlatformSpeechSynthesisUtterance::client):
2452 * platform/PlatformSpeechSynthesizer.cpp:
2453 (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
2454 * platform/PlatformSpeechSynthesizer.h:
2455 (PlatformSpeechSynthesizerClient):
2456 (WebCore::PlatformSpeechSynthesizer::client):
2457 (PlatformSpeechSynthesizer):
2458 * platform/mac/PlatformSpeechSynthesizerMac.mm:
2459 (-[WebSpeechSynthesisWrapper initWithSpeechSynthesizer:WebCore::]):
2460 (-[WebSpeechSynthesisWrapper dealloc]):
2461 (-[WebSpeechSynthesisWrapper convertRateToWPM:]):
2462 (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
2463 (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
2464 (WebCore::PlatformSpeechSynthesizer::speak):
2466 2013-02-10 Eric Seidel <eric@webkit.org>
2468 Make the existing HTMLPreloadScanner threading-aware
2469 https://bugs.webkit.org/show_bug.cgi?id=107807
2471 Reviewed by Adam Barth.
2473 The HTMLPreloadScanner and CSSPreloadScanner do a number of things.
2474 CSSPreloadScanner is mostly just a helper class for HTMLPreloadScanner.
2475 HTMLPreloadScanner runs its own copy of the HTMLTokenizer and uses
2476 HTMLTokenizer::updateStateFor to emulate enough of the TreeBuilder
2477 to get a realistic stream of tokens. It does some additional TreeBuilder
2478 emulation, including tracking template tags and base tags, but mostly
2479 just scans the token stream for start-tags and looks for URLs in them.
2480 It tracks when it has seen a <style> tag and starts sending all character tokens
2481 to the CSSPreloadScanner until a </style> tag is seen.
2482 It also (unfortunately) knows some about the loader guts and how to construct
2483 a proper CachedResourcRequest and issue a preload.
2485 This patch changes the model so that the preload scanners only know how to produce
2486 PreloadRequest objects and append them to a passed-in vector.
2488 This changes the preload-scanner behavior so that preloads are now all issued in one large
2489 batch at the end of scanning, instead of as we hit each resource. It's possible that
2490 we'll wait to instead check for preload requests more often, at a possible tradeoff
2491 to tokenizing speed.
2493 An alternate approach might be to pass in a preload-delegate of sorts which knew how
2494 to either build a vector, or send requests immediately. For now the build-a-vector-always
2495 approach seems clean, and does not seem to slow down our PerformanceTest microbenchmarks at least.
2497 This patch has 2 main pieces:
2498 - Remove Document and (and loader) dependencies from HTMLPreloadScanner/CSSPreloadScanner
2499 This is done through introduction of a new HTMLResourcePreloader class which holds
2500 a Document* and knows how to talk to the CachedResourceLoader.
2501 - Clean-up HTMLPreloadScanners token-loop to not be tied to having a Tokenizer.
2502 (On a background thead, the HTMLPreloadScanner won't own the tokenizer, it will just
2503 be passed in tokens and expected to issue loads if necessary.)
2505 This passes all of the LayoutTests using the main thread parser.
2507 This patch does not make the HTMLPreloadScanner 100% ready for threading
2508 (it still uses AtomicString which is currently not-OK on the parser thread)
2509 but it's very close. Two further (already written) patches will complete this.
2512 * GNUmakefile.list.am:
2515 * WebCore.vcproj/WebCore.vcproj:
2516 * WebCore.vcxproj/WebCore.vcxproj:
2517 * WebCore.xcodeproj/project.pbxproj:
2518 * html/parser/CSSPreloadScanner.cpp:
2519 (WebCore::CSSPreloadScanner::CSSPreloadScanner):
2520 (WebCore::CSSPreloadScanner::scan):
2521 (WebCore::CSSPreloadScanner::emitRule):
2522 * html/parser/CSSPreloadScanner.h:
2523 (CSSPreloadScanner):
2524 * html/parser/HTMLDocumentParser.cpp:
2525 (WebCore::HTMLDocumentParser::HTMLDocumentParser):
2526 (WebCore::HTMLDocumentParser::pumpTokenizer):
2527 (WebCore::HTMLDocumentParser::insert):
2528 (WebCore::HTMLDocumentParser::append):
2529 (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
2530 * html/parser/HTMLDocumentParser.h:
2531 (HTMLDocumentParser):
2532 * html/parser/HTMLPreloadScanner.cpp:
2533 (WebCore::isStartTag):
2535 (WebCore::isStartOrEndTag):
2536 (WebCore::PreloadTask::processAttributes):
2537 (WebCore::PreloadTask::charset):
2539 (WebCore::PreloadTask::resourceType):
2540 (WebCore::PreloadTask::shouldPreload):
2541 (WebCore::PreloadTask::createPreloadRequest):
2542 (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
2543 (WebCore::HTMLPreloadScanner::scan):
2544 (WebCore::HTMLPreloadScanner::processPossibleTemplateTag):
2545 (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
2546 (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
2547 (WebCore::HTMLPreloadScanner::processToken):
2548 * html/parser/HTMLPreloadScanner.h:
2549 (HTMLPreloadScanner):
2550 * html/parser/HTMLResourcePreloader.cpp: Added.
2552 (WebCore::isStringSafeToSendToAnotherThread):
2553 (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
2554 (WebCore::PreloadRequest::completeURL):
2555 (WebCore::PreloadRequest::resourceRequest):
2556 (WebCore::HTMLResourcePreloader::preload):
2557 * html/parser/HTMLResourcePreloader.h: Added.
2560 (WebCore::PreloadRequest::create):
2561 (WebCore::PreloadRequest::PreloadRequest):
2562 (HTMLResourcePreloader):
2563 (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
2564 (WebCore::HTMLResourcePreloader::createWeakPtr):
2565 * loader/cache/CachedResourceRequest.h:
2567 2013-02-06 Kentaro Hara <haraken@chromium.org>
2569 [V8] Rename isolated() to getWorld(), rename worldForEnteredContextIfIsolated() to worldForEnteredContext()
2570 https://bugs.webkit.org/show_bug.cgi?id=109039
2572 Reviewed by Adam Barth.
2574 This is a follow-up patch for r141983.
2575 Rename methods for consistency.
2577 No tests. No change in behavior.
2579 * bindings/v8/DOMDataStore.cpp:
2580 (WebCore::DOMDataStore::current):
2581 * bindings/v8/DOMWrapperWorld.h:
2582 (WebCore::DOMWrapperWorld::getWorld):
2583 * bindings/v8/ScriptController.cpp:
2584 (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
2585 (WebCore::ScriptController::currentWorldContext):
2586 * bindings/v8/V8Binding.h:
2587 (WebCore::worldForEnteredContext):
2588 * bindings/v8/WorldContextHandle.cpp:
2589 (WebCore::WorldContextHandle::WorldContextHandle):
2590 * bindings/v8/custom/V8DocumentCustom.cpp:
2592 * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2594 * bindings/v8/custom/V8SVGDocumentCustom.cpp:
2596 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2597 (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
2599 2013-02-10 Alexandre Elias <aelias@chromium.org>
2601 [chromium] Fix Android scrollbar size
2602 https://bugs.webkit.org/show_bug.cgi?id=109374
2604 Reviewed by James Robinson.
2606 This shrinks scrollbars to 3 device-independent pixels (usually 6
2607 physical pixels) and deletes the edge fade. Although the Android
2608 system theme does have an edge fade, it's a much sharper cliff
2609 than we had (against black, the colors go 64 -> 64 -> 52 -> 21 -> 0)
2610 and I can't perceive any difference compared with no fade at all.
2612 No new tests (due for rewrite in a week anyway).
2614 * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
2616 (WebCore::ScrollbarThemeChromiumAndroid::paintThumb):
2618 2013-02-04 Kentaro Hara <haraken@chromium.org>
2620 [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise
2621 https://bugs.webkit.org/show_bug.cgi?id=108579
2623 Reviewed by Adam Barth.
2625 Currently V8GCController::m_edenNodes stores a list of nodes whose
2626 wrappers have been created since the latest GC. The reason why we
2627 needed m_edenNodes is that there was no way to know a list of wrappers
2628 in the new space of V8. By using m_edenNodes, we had been approximating
2629 'wrappers in the new space' by 'wrappers that have been created since
2632 Now V8 provides VisitHandlesForPartialDependence(), with which WebKit
2633 can know a list of wrappers in the new space. By using the API, we can
2634 remove V8GCController::m_edenNodes. The benefit is that (1) we no longer
2635 need to keep m_edenNodes and that (2) it enables more precise minor
2636 DOM GC (Remember that m_edenNodes was just an approximation).
2638 Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940
2639 The benchmark runs 300 iterations, each of which creates 100000 elements.
2640 The benchmark measures average, min, median, max and stdev of execution times
2641 of the 300 iterations. This will tell us the worst-case overhead of this change.
2644 mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms
2647 mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms
2649 As shown above, I couldn't observe any performance regression.
2651 No tests. No change in behavior.
2653 * bindings/v8/DOMDataStore.h:
2654 (WebCore::DOMDataStore::setWrapperInObject):
2655 * bindings/v8/DOMWrapperWorld.h:
2657 (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck):
2658 * bindings/v8/V8Binding.h:
2660 (WebCore::worldForEnteredContextIfIsolated):
2661 (WebCore::worldForEnteredContextWithoutContextCheck):
2662 * bindings/v8/V8DOMWindowShell.cpp:
2663 (WebCore::V8DOMWindowShell::initializeIfNeeded):
2664 * bindings/v8/V8GCController.cpp:
2667 (MinorGCWrapperVisitor):
2668 (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor):
2669 (WebCore::MinorGCWrapperVisitor::notifyFinished):
2670 (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor):
2671 (WebCore::V8GCController::gcPrologue):
2672 (WebCore::V8GCController::minorGCPrologue):
2673 (WebCore::V8GCController::majorGCPrologue):
2674 * bindings/v8/V8GCController.h:
2677 2013-02-10 Tim Horton <timothy_horton@apple.com>
2679 REGRESSION (r132422): Page content and scrollbars are incorrectly offset after restoring a page from the page cache
2680 https://bugs.webkit.org/show_bug.cgi?id=109317
2681 <rdar://problem/12649131>
2683 Reviewed by Simon Fraser.
2685 Mark all scrolling that occurs beneath FrameView::layout as programmatic.
2687 Test: platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html
2689 * page/FrameView.cpp:
2690 (WebCore::FrameView::layout):
2692 2013-02-10 Kent Tamura <tkent@chromium.org>
2694 [Mac] Fix release build failure by recent reverts
2698 2013-02-10 Philippe Normand <pnormand@igalia.com>
2700 [GStreamer] media/video-controls-fullscreen-volume.html crashes
2701 https://bugs.webkit.org/show_bug.cgi?id=108682
2703 Reviewed by Martin Robinson.
2705 Clean up various signal handlers and avoid bad interaction between
2706 the FullscreenVideoControllerGStreamer and its subclasses,
2707 especially when the platform video window is created.
2709 * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp:
2710 (WebCore::FullscreenVideoControllerGStreamer::enterFullscreen):
2711 Initialize the window before connecting to the volume/mute
2712 signals. This ensures that the signals won't ever interfere with
2713 an inexisting window.
2714 * platform/graphics/gstreamer/GStreamerGWorld.cpp:
2715 (WebCore::GStreamerGWorld::~GStreamerGWorld): Remove GstBus
2716 synchronous handler function.
2717 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2718 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2719 (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
2720 Disconnect from volume/mute signals.
2721 (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
2722 Keep a trace of volume/mute signal handlers.
2723 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2724 Various forward type declarations to avoid un-necessary header includes.
2725 (MediaPlayerPrivateGStreamerBase):
2726 * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
2727 (WebCore::FullscreenVideoControllerGtk::FullscreenVideoControllerGtk):
2728 (WebCore::FullscreenVideoControllerGtk::volumeChanged): Bail out
2729 if volume button hasn't been created yet.
2730 (WebCore::FullscreenVideoControllerGtk::muteChanged): Ditto.
2732 2013-02-10 Andreas Kling <akling@apple.com>
2734 RenderStyle should use copy-on-write inheritance for NinePieceImage.
2735 <http://webkit.org/b/109366>
2737 Reviewed by Antti Koivisto.
2739 Refactor NinePieceImage to hold a copy-on-write DataRef like other RenderStyle substructures.
2740 This allows us to avoids copying the NinePieceImageData when one RenderStyle inherits from another
2741 but modifies something in the substructure holding the NinePieceImage (typically StyleSurroundData.)
2743 Also made RenderStyle not copy-on-write its StyleSurroundData prematurely when doing a no-op write
2744 to a border-image related value.
2746 1.23 MB progression on Membuster3.
2748 * rendering/style/NinePieceImage.cpp:
2749 (WebCore::defaultData):
2750 (WebCore::NinePieceImage::NinePieceImage):
2751 (WebCore::NinePieceImageData::NinePieceImageData):
2752 (WebCore::NinePieceImageData::operator==):
2753 * rendering/style/NinePieceImage.h:
2754 (WebCore::NinePieceImageData::create):
2755 (WebCore::NinePieceImageData::copy):
2756 (NinePieceImageData):
2758 (WebCore::NinePieceImage::operator==):
2759 (WebCore::NinePieceImage::operator!=):
2760 (WebCore::NinePieceImage::hasImage):
2761 (WebCore::NinePieceImage::image):
2762 (WebCore::NinePieceImage::setImage):
2763 (WebCore::NinePieceImage::imageSlices):
2764 (WebCore::NinePieceImage::setImageSlices):
2765 (WebCore::NinePieceImage::fill):
2766 (WebCore::NinePieceImage::setFill):
2767 (WebCore::NinePieceImage::borderSlices):
2768 (WebCore::NinePieceImage::setBorderSlices):
2769 (WebCore::NinePieceImage::outset):
2770 (WebCore::NinePieceImage::setOutset):
2771 (WebCore::NinePieceImage::horizontalRule):
2772 (WebCore::NinePieceImage::setHorizontalRule):
2773 (WebCore::NinePieceImage::verticalRule):
2774 (WebCore::NinePieceImage::setVerticalRule):
2775 (WebCore::NinePieceImage::copyImageSlicesFrom):
2776 (WebCore::NinePieceImage::copyBorderSlicesFrom):
2777 (WebCore::NinePieceImage::copyOutsetFrom):
2778 (WebCore::NinePieceImage::copyRepeatFrom):
2779 (WebCore::NinePieceImage::setMaskDefaults):
2780 (WebCore::NinePieceImage::computeOutset):
2781 * rendering/style/RenderStyle.cpp:
2782 (WebCore::RenderStyle::setBorderImageSource):
2783 (WebCore::RenderStyle::setBorderImageSlices):
2784 (WebCore::RenderStyle::setBorderImageWidth):
2785 (WebCore::RenderStyle::setBorderImageOutset):
2786 * rendering/style/RenderStyle.h:
2788 2013-02-10 Kent Tamura <tkent@chromium.org>
2790 Unreviewed, rolling out r142343.
2791 http://trac.webkit.org/changeset/142343
2792 https://bugs.webkit.org/show_bug.cgi?id=108284
2794 It might make inspector/profiler/selector-profiler-url.html
2800 * html/HTMLPlugInElement.cpp:
2801 (WebCore::HTMLPlugInElement::defaultEventHandler):
2802 * html/HTMLPlugInImageElement.cpp:
2803 (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2804 (WebCore::HTMLPlugInImageElement::createRenderer):
2805 (WebCore::HTMLPlugInImageElement::willRecalcStyle):
2806 (WebCore::HTMLPlugInImageElement::updateSnapshot):
2807 (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
2808 (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
2809 * html/HTMLPlugInImageElement.h:
2811 (HTMLPlugInImageElement):
2812 * page/ChromeClient.h:
2813 (WebCore::ChromeClient::plugInStartLabelImage):
2814 * platform/LocalizedStrings.cpp:
2815 * platform/LocalizedStrings.h:
2816 * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2817 * platform/chromium/LocalizedStringsChromium.cpp:
2818 * platform/efl/LocalizedStringsEfl.cpp:
2820 * platform/gtk/LocalizedStringsGtk.cpp:
2822 * platform/qt/LocalizedStringsQt.cpp:
2823 * rendering/RenderSnapshottedPlugIn.cpp:
2825 (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
2826 (WebCore::RenderSnapshottedPlugIn::paint):
2827 (WebCore::RenderSnapshottedPlugIn::paintReplaced):
2828 (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2829 (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshot):
2830 (WebCore::RenderSnapshottedPlugIn::startLabelImage):
2831 (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshotWithLabel):
2832 (WebCore::RenderSnapshottedPlugIn::getCursor):
2833 (WebCore::RenderSnapshottedPlugIn::handleEvent):
2834 (WebCore::RenderSnapshottedPlugIn::tryToFitStartLabel):
2835 * rendering/RenderSnapshottedPlugIn.h:
2837 2013-02-10 Andreas Kling <akling@apple.com>
2839 RenderText: Access characters through m_text instead of caching data pointers separately.
2840 <http://webkit.org/b/109357>
2842 Reviewed by Antti Koivisto.
2844 Go through RenderText::m_text.impl() instead of caching the character data pointer.
2845 RenderText should never have a null String in m_text so it's safe to access impl() directly.
2846 We have assertions for this since before.
2848 Removing this pointer shrinks RenderText by 8 bytes, allowing it to fit into a snugger size class.
2849 749 KB progression on Membuster3.
2851 * rendering/RenderText.cpp:
2852 (SameSizeAsRenderText):
2853 (WebCore::RenderText::RenderText):
2854 (WebCore::RenderText::setTextInternal):
2855 * rendering/RenderText.h:
2856 (WebCore::RenderText::is8Bit):
2857 (WebCore::RenderText::characters8):
2858 (WebCore::RenderText::characters16):
2859 (WebCore::RenderText::characterAt):
2860 (WebCore::RenderText::operator[]):
2863 2013-02-10 Jae Hyun Park <jae.park08@gmail.com>
2865 Rename ENABLE(GLIB_SUPPORT) to USE(GLIB)
2866 https://bugs.webkit.org/show_bug.cgi?id=104266
2868 Reviewed by Philippe Normand.
2870 Using USE(GLIB) instead of ENABLE(GLIB_SUPPORT) is more consistent with
2871 the existing macro naming conventions.
2874 USE() - use a particular third-party library or optional OS service
2875 ENABLE() - turn on a specific feature of WebKit
2877 No new tests, no new functionality.
2881 2013-02-10 Zan Dobersek <zdobersek@igalia.com>
2883 [GTK] Build errors in TextureMapperShaderProgram.cpp when compiling with Clang
2884 https://bugs.webkit.org/show_bug.cgi?id=109321
2886 Reviewed by Noam Rosenthal.
2888 Clang is reporting errors due to non-constant expressions that cannot be narrowed
2889 from double to float type in initializer list when constructing a matrix of GC3Dfloat
2890 numbers. To avoid this every parameter is passed through an explicit GC3Dfloat constructor.
2892 No new tests - no new functionality.
2894 * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
2895 (WebCore::TextureMapperShaderProgram::setMatrix):
2897 2013-02-10 Philippe Normand <pnormand@igalia.com>
2899 [GStreamer] audio is muted when playback rate is between 0.8 and 2.0
2900 https://bugs.webkit.org/show_bug.cgi?id=109362
2902 Reviewed by Martin Robinson.
2904 Don't mute sound if the audio pitch is preserved. If this is not
2905 the case mute it if it's too extreme, as the HTML5 spec recommends.
2907 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2908 (WebCore::MediaPlayerPrivateGStreamer::setRate):
2910 2013-02-09 Dominic Mazzoni <dmazzoni@google.com>
2912 fast/encoding/parser-tests-*.html tests sometimes crash
2913 https://bugs.webkit.org/show_bug.cgi?id=108058
2915 Reviewed by Chris Fleizach.
2917 To avoid calling accessibilityIsIgnored while the render
2918 tree is unstable, call accessibilityIsIgnored in the
2919 notification timer handler, only for childrenChanged
2922 This exposed a problem where notifications queued on
2923 objects can fire after the object has been deleted; fix that
2924 by checking the object's id, which is always set to 0 when
2925 removed from the tree.
2927 Covered by existing tests.
2929 * accessibility/AXObjectCache.cpp:
2930 (WebCore::AXObjectCache::childrenChanged):
2931 (WebCore::AXObjectCache::notificationPostTimerFired):
2933 2013-02-09 Eric Carlson <eric.carlson@apple.com>
2935 [Mac] Do not assume MediaAccessibility framework is installed
2936 https://bugs.webkit.org/show_bug.cgi?id=109365
2938 Reviewed by Sam Weinig.
2940 * page/CaptionUserPreferencesMac.h:
2941 * page/CaptionUserPreferencesMac.mm:
2942 (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Call the base class if the framework
2944 (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
2945 (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
2946 (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Ditto.
2947 (WebCore::CaptionUserPreferencesMac::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
2948 (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Ditto.
2949 (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
2950 (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
2951 (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto.
2953 2013-02-09 Dominic Mazzoni <dmazzoni@google.com>
2955 AX: move isIgnored caching to AXObject
2956 https://bugs.webkit.org/show_bug.cgi?id=109322
2958 Reviewed by Chris Fleizach.
2960 There's some benefit to caching accessibilityIsIgnored
2961 (using AXComputedObjectAttributeCache) for more than just
2962 AXRenderObject, so move the caching code to AXObject.
2964 AXObject now has a protected virtual method
2965 computeAccessibilityIsIgnored, and all subclasses
2966 override that instead.
2970 * accessibility/AccessibilityImageMapLink.h:
2971 (AccessibilityImageMapLink):
2972 (WebCore::AccessibilityImageMapLink::computeAccessibilityIsIgnored):
2973 * accessibility/AccessibilityList.cpp:
2974 (WebCore::AccessibilityList::computeAccessibilityIsIgnored):
2975 * accessibility/AccessibilityList.h:
2976 (AccessibilityList):
2977 * accessibility/AccessibilityListBox.cpp:
2978 (WebCore::AccessibilityListBox::computeAccessibilityIsIgnored):
2979 * accessibility/AccessibilityListBox.h:
2980 (AccessibilityListBox):
2981 * accessibility/AccessibilityListBoxOption.cpp:
2982 (WebCore::AccessibilityListBoxOption::computeAccessibilityIsIgnored):
2983 * accessibility/AccessibilityListBoxOption.h:
2984 (AccessibilityListBoxOption):
2985 * accessibility/AccessibilityMediaControls.cpp:
2986 (WebCore::AccessibilityMediaControl::computeAccessibilityIsIgnored):
2987 (WebCore::AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored):
2988 * accessibility/AccessibilityMediaControls.h:
2989 (AccessibilityMediaControl):
2990 (WebCore::AccessibilityMediaControlsContainer::computeAccessibilityIsIgnored):
2991 (AccessibilityMediaTimeDisplay):
2992 * accessibility/AccessibilityMenuList.h:
2993 (WebCore::AccessibilityMenuList::computeAccessibilityIsIgnored):
2994 * accessibility/AccessibilityMenuListOption.cpp:
2995 (WebCore::AccessibilityMenuListOption::computeAccessibilityIsIgnored):
2996 * accessibility/AccessibilityMenuListOption.h:
2997 (AccessibilityMenuListOption):
2998 * accessibility/AccessibilityMenuListPopup.cpp:
2999 (WebCore::AccessibilityMenuListPopup::computeAccessibilityIsIgnored):
3000 * accessibility/AccessibilityMenuListPopup.h:
3001 (AccessibilityMenuListPopup):
3002 * accessibility/AccessibilityNodeObject.cpp:
3003 (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):
3004 * accessibility/AccessibilityNodeObject.h:
3005 (AccessibilityNodeObject):
3006 * accessibility/AccessibilityObject.cpp:
3007 (WebCore::AccessibilityObject::accessibilityIsIgnored):
3009 * accessibility/AccessibilityObject.h:
3010 (AccessibilityObject):
3011 (WebCore::AccessibilityObject::computeAccessibilityIsIgnored):
3012 * accessibility/AccessibilityProgressIndicator.cpp:
3013 (WebCore::AccessibilityProgressIndicator::computeAccessibilityIsIgnored):
3014 * accessibility/AccessibilityProgressIndicator.h:
3015 (AccessibilityProgressIndicator):
3016 * accessibility/AccessibilityRenderObject.cpp:
3017 (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3018 * accessibility/AccessibilityRenderObject.h:
3019 (AccessibilityRenderObject):
3020 * accessibility/AccessibilityScrollView.cpp:
3021 (WebCore::AccessibilityScrollView::computeAccessibilityIsIgnored):
3022 * accessibility/AccessibilityScrollView.h:
3023 (AccessibilityScrollView):
3024 * accessibility/AccessibilityScrollbar.h:
3025 (WebCore::AccessibilityScrollbar::computeAccessibilityIsIgnored):
3026 * accessibility/AccessibilitySlider.cpp:
3027 (WebCore::AccessibilitySlider::computeAccessibilityIsIgnored):
3028 (WebCore::AccessibilitySliderThumb::computeAccessibilityIsIgnored):
3029 * accessibility/AccessibilitySlider.h:
3030 (AccessibilitySlider):
3031 (AccessibilitySliderThumb):
3032 * accessibility/AccessibilitySpinButton.h:
3033 (WebCore::AccessibilitySpinButton::computeAccessibilityIsIgnored):
3034 (WebCore::AccessibilitySpinButtonPart::computeAccessibilityIsIgnored):
3035 * accessibility/AccessibilityTable.cpp:
3036 (WebCore::AccessibilityTable::computeAccessibilityIsIgnored):
3037 * accessibility/AccessibilityTable.h:
3038 (AccessibilityTable):
3039 * accessibility/AccessibilityTableCell.cpp:
3040 (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
3041 * accessibility/AccessibilityTableCell.h:
3042 (AccessibilityTableCell):
3043 * accessibility/AccessibilityTableColumn.cpp:
3044 (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
3045 * accessibility/AccessibilityTableColumn.h:
3046 (AccessibilityTableColumn):
3047 * accessibility/AccessibilityTableHeaderContainer.cpp:
3048 (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
3049 * accessibility/AccessibilityTableHeaderContainer.h:
3050 (AccessibilityTableHeaderContainer):
3051 * accessibility/AccessibilityTableRow.cpp:
3052 (WebCore::AccessibilityTableRow::computeAccessibilityIsIgnored):
3053 * accessibility/AccessibilityTableRow.h:
3054 (AccessibilityTableRow):
3056 2013-02-09 David Farler <dfarler@apple.com>
3058 Make TestWebKitAPI work for iOS
3059 https://bugs.webkit.org/show_bug.cgi?id=108978
3061 Reviewed by David Kilzer.
3063 Tests already exist - refactor only.
3065 * WebCore.exp.in: Lumped __ZNK7WebCore4KURL7hasPathEv with related methods.
3066 * platform/KURL.cpp: Inlined hasPath() into the header
3067 * platform/KURL.h: Inlined hasPath() into the header
3069 2013-02-09 Adam Barth <abarth@webkit.org>
3071 Load event fires too early with threaded HTML parser
3072 https://bugs.webkit.org/show_bug.cgi?id=108984
3074 Reviewed by Eric Seidel.
3076 Previously, the DocumentLoader would always be on the stack when the
3077 HTMLDocumentParser was processing data from the network. The
3078 DocumentLoader would then tell isLoadingInAPISense not to fire the load
3079 event. Now that we process data asynchronously with the threaded
3080 parser, the DocumentLoader is not always on the stack, which means we
3081 need to delay the load event using the clause that asks the parser
3082 whether it is processing data.
3084 Unfortunately, that clause is fragile because we can check for load
3085 completion while we're switching parsers between the network-created
3086 parser and a script-created parser. To avoid accidentially triggerin
3087 the load event during these "gaps," this patch introduces a counter on
3088 document to record how many parsers are active on the stack. While
3089 that numer is non-zero, we'll delay the load event. When that number
3090 reaches zero, we'll check for load complete.
3092 That last step is required because the DocumentLoader::finishLoading
3093 method is no longer guarunteed to check for load complete after calling
3094 finish on the parser because the finish operation might complete
3097 After this patch, the threaded parser passes all but four fast/parser
3101 (WebCore::Document::Document):
3102 (WebCore::Document::hasActiveParser):
3104 (WebCore::Document::decrementActiveParserCount):
3107 (WebCore::Document::incrementActiveParserCount):
3108 * html/parser/HTMLDocumentParser.cpp:
3109 (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
3110 (WebCore::HTMLDocumentParser::pumpTokenizer):
3111 * html/parser/HTMLParserScheduler.cpp:
3112 (WebCore::ActiveParserSession::ActiveParserSession):
3114 (WebCore::ActiveParserSession::~ActiveParserSession):
3115 (WebCore::PumpSession::PumpSession):
3116 (WebCore::PumpSession::~PumpSession):
3117 * html/parser/HTMLParserScheduler.h:
3119 (ActiveParserSession):
3121 * loader/DocumentLoader.cpp:
3122 (WebCore::DocumentLoader::isLoadingInAPISense):
3124 2013-02-09 Mike West <mkwst@chromium.org>
3126 Use IGNORE_EXCEPTION for initialized, but unused, ExceptionCodes.
3127 https://bugs.webkit.org/show_bug.cgi?id=109295
3129 Reviewed by Darin Adler.
3131 The monster patch in http://wkbug.com/108771 missed an entire class of
3132 ignored exceptions. It only dealt with call sites that never initialized
3133 the ExceptionCode variable, on the assumption that only such call sites
3134 would ignore the variable's value.
3136 That was a flawed assumption: a large number of sites that initialize the
3137 ExceptionCode to 0 ignore it regardless. This patch deals with the
3138 almost-as-large set of callsites that initialize the variable, pass it to
3139 a function, and then never touch it again.
3141 * Modules/indexeddb/IDBDatabase.cpp:
3142 (WebCore::IDBDatabase::forceClose):
3143 * accessibility/AccessibilityRenderObject.cpp:
3144 (WebCore::AccessibilityRenderObject::ariaSelectedTextRange):
3145 (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
3146 (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
3147 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3148 (getSelectionOffsetsForObject):
3149 * accessibility/atk/WebKitAccessibleUtil.cpp:
3150 (selectionBelongsToObject):
3152 (WebCore::Node::textRects):
3153 * editing/DeleteButtonController.cpp:
3154 (WebCore::DeleteButtonController::hide):
3155 * editing/EditingStyle.cpp:
3156 (WebCore::EditingStyle::styleAtSelectionStart):
3157 * editing/Editor.cpp:
3158 (WebCore::Editor::canDeleteRange):
3159 (WebCore::Editor::pasteAsPlainText):
3160 (WebCore::Editor::pasteAsFragment):
3161 (WebCore::Editor::shouldDeleteRange):
3162 (WebCore::Editor::dispatchCPPEvent):
3163 (WebCore::Editor::setComposition):
3164 (WebCore::Editor::advanceToNextMisspelling):
3165 (WebCore::isFrameInRange):
3166 * editing/EditorCommand.cpp:
3167 (WebCore::expandSelectionToGranularity):
3168 * editing/MergeIdenticalElementsCommand.cpp:
3169 (WebCore::MergeIdenticalElementsCommand::doApply):
3170 * editing/SplitElementCommand.cpp:
3171 (WebCore::SplitElementCommand::doUnapply):
3172 * editing/SplitTextNodeCommand.cpp:
3173 (WebCore::SplitTextNodeCommand::doApply):
3174 * editing/TextCheckingHelper.cpp:
3175 (WebCore::expandToParagraphBoundary):
3176 (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
3177 (WebCore::TextCheckingHelper::isUngrammatical):
3178 (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
3179 * editing/TextInsertionBaseCommand.cpp:
3180 (WebCore::dispatchBeforeTextInsertedEvent):
3181 (WebCore::canAppendNewLineFeedToSelection):
3182 * editing/TextIterator.cpp:
3183 (WebCore::findPlainText):
3184 * editing/htmlediting.cpp:
3185 (WebCore::extendRangeToWrappingNodes):
3186 (WebCore::isNodeVisiblyContainedWithin):
3187 * editing/visible_units.cpp:
3188 (WebCore::nextBoundary):
3189 * html/FileInputType.cpp:
3190 (WebCore::FileInputType::createShadowSubtree):
3191 * html/HTMLKeygenElement.cpp:
3192 (WebCore::HTMLKeygenElement::HTMLKeygenElement):
3193 * html/HTMLScriptElement.cpp:
3194 (WebCore::HTMLScriptElement::setText):
3195 * html/HTMLTitleElement.cpp:
3196 (WebCore::HTMLTitleElement::setText):
3197 * html/HTMLTrackElement.cpp:
3198 (WebCore::HTMLTrackElement::didCompleteLoad):
3199 * html/RangeInputType.cpp:
3200 (WebCore::RangeInputType::createShadowSubtree):
3201 * html/SearchInputType.cpp:
3202 (WebCore::SearchInputType::createShadowSubtree):
3203 * html/TextFieldInputType.cpp:
3204 (WebCore::TextFieldInputType::createShadowSubtree):
3205 * html/track/TextTrackList.cpp:
3206 (TextTrackList::asyncEventTimerFired):
3207 * inspector/DOMPatchSupport.cpp:
3208 (WebCore::DOMPatchSupport::patchDocument):
3209 * inspector/InspectorDatabaseAgent.cpp:
3211 * inspector/InspectorFileSystemAgent.cpp:
3213 * page/DOMSelection.cpp:
3214 (WebCore::DOMSelection::addRange):
3215 * page/DragController.cpp:
3216 (WebCore::DragController::dispatchTextInputEventFor):
3217 * page/EventHandler.cpp:
3218 (WebCore::EventHandler::dispatchMouseEvent):
3219 (WebCore::EventHandler::handleTouchEvent):
3220 * page/FrameActionScheduler.cpp:
3221 (WebCore::EventFrameAction::fire):
3222 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3223 (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
3224 * svg/SVGDocument.cpp:
3225 (WebCore::SVGDocument::dispatchZoomEvent):
3226 (WebCore::SVGDocument::dispatchScrollEvent):
3227 * svg/SVGLength.cpp:
3228 (WebCore::SVGLength::SVGLength):
3229 (WebCore::SVGLength::value):
3230 * xml/parser/XMLDocumentParser.cpp:
3231 (WebCore::XMLDocumentParser::exitText):
3232 * xml/parser/XMLDocumentParserQt.cpp:
3233 (WebCore::XMLDocumentParser::parse):
3234 (WebCore::XMLDocumentParser::startDocument):
3235 (WebCore::XMLDocumentParser::parseCharacters):
3237 2013-02-09 Stephen White <senorblanco@chromium.org>
3239 [skia] Fix memory management in SkiaImageFilterBuilder and friends.
3240 https://bugs.webkit.org/show_bug.cgi?id=109326
3242 Sadly, skia has no official ref-counted pointers, so we must make do
3245 Reviewed by James Robinson.
3247 Correctness covered by existing tests in css3/filters.
3249 * platform/graphics/filters/skia/FEBlendSkia.cpp:
3250 (WebCore::FEBlend::createImageFilter):
3251 * platform/graphics/filters/skia/FEComponentTransferSkia.cpp:
3252 (WebCore::FEComponentTransfer::createImageFilter):
3253 * platform/graphics/filters/skia/FELightingSkia.cpp:
3254 (WebCore::FELighting::createImageFilter):
3255 Adopt refs produced by the build() pass with SkAutoTUnref.
3256 * platform/graphics/filters/skia/SkiaImageFilterBuilder.cpp:
3257 (WebCore::SkiaImageFilterBuilder::~SkiaImageFilterBuilder):
3258 Unref the builder's hashmap effect pointers.
3259 (WebCore::SkiaImageFilterBuilder::build):
3260 Ref the pointer returned to the caller, and use SkAutoTUnref
3261 internally while building the tree.
3262 * platform/graphics/filters/skia/SkiaImageFilterBuilder.h:
3263 (SkiaImageFilterBuilder):
3264 Add a destructor to SkiaImageFilterBuilder.
3267 2013-02-09 Dominic Mazzoni <dmazzoni@google.com>
3269 AX: Rename AXObject::cachedIsIgnoredValue to lastKnownIsIgnoredValue
3270 https://bugs.webkit.org/show_bug.cgi?id=108238
3272 Reviewed by Chris Fleizach.
3274 Simple refactoring, no new tests.
3276 * accessibility/AXObjectCache.cpp:
3277 (WebCore::AXObjectCache::getOrCreate):
3278 (WebCore::AXObjectCache::childrenChanged):
3279 * accessibility/AccessibilityObject.cpp:
3280 (WebCore::AccessibilityObject::AccessibilityObject):
3281 (WebCore::AccessibilityObject::lastKnownIsIgnoredValue):
3282 (WebCore::AccessibilityObject::setLastKnownIsIgnoredValue):
3283 (WebCore::AccessibilityObject::notifyIfIgnoredValueChanged):
3284 * accessibility/AccessibilityObject.h:
3285 (AccessibilityObject):
3287 2013-02-09 Anton Vayvod <avayvod@chromium.org>
3289 [Text Autosizing] Cleanup change: converter the pointer argument to be a reference since
3290 non-null pointer is always expected.
3291 https://bugs.webkit.org/show_bug.cgi?id=109079
3293 Reviewed by Kenneth Rohde Christiansen.
3295 Cleanup change, no need to add new tests or modify the existing ones.
3297 * rendering/TextAutosizer.cpp:
3299 Changed parameter from a pointer to a reference in the methods below.
3301 (WebCore::TextAutosizer::processSubtree):
3302 (WebCore::TextAutosizer::processCluster):
3303 (WebCore::TextAutosizer::processContainer):
3304 (WebCore::TextAutosizer::isNarrowDescendant):
3305 (WebCore::TextAutosizer::isWiderDescendant):
3306 (WebCore::TextAutosizer::isAutosizingCluster):
3307 (WebCore::TextAutosizer::clusterShouldBeAutosized):
3308 (WebCore::TextAutosizer::measureDescendantTextWidth):
3310 * rendering/TextAutosizer.h: updated method prototypes.
3312 2013-02-09 Rafael Brandao <rafael.lobo@openbossa.org>
3314 [TexMap] Separate classes per file in TextureMapperBackingStore.h
3315 https://bugs.webkit.org/show_bug.cgi?id=109333
3317 Reviewed by Noam Rosenthal.
3319 TextureMapperBackingStore.h had the classes TextureMapperBackingStore,
3320 TextureMapperTiledBackingStore, TextureMapperSurfaceBackingStore and
3321 TextureMapperTile which was quite confusing. Now each one has its
3322 own header and its own source file.
3324 No new tests needed, refactoring only.
3327 * GNUmakefile.list.am:
3330 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
3331 * platform/graphics/texmap/TextureMapperBackingStore.cpp:
3332 * platform/graphics/texmap/TextureMapperBackingStore.h:
3333 * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp: Added.
3335 (WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface):
3336 (WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded):
3337 (WebCore::TextureMapperSurfaceBackingStore::texture):
3338 (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
3339 * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h: Added.
3341 (TextureMapperSurfaceBackingStore):
3342 (WebCore::TextureMapperSurfaceBackingStore::create):
3343 (WebCore::TextureMapperSurfaceBackingStore::~TextureMapperSurfaceBackingStore):
3344 (WebCore::TextureMapperSurfaceBackingStore::TextureMapperSurfaceBackingStore):
3345 * platform/graphics/texmap/TextureMapperTile.cpp: Added.
3347 (WebCore::TextureMapperTile::updateContents):
3348 (WebCore::TextureMapperTile::paint):
3349 * platform/graphics/texmap/TextureMapperTile.h: Added.
3351 (TextureMapperTile):
3352 (WebCore::TextureMapperTile::texture):
3353 (WebCore::TextureMapperTile::rect):
3354 (WebCore::TextureMapperTile::setTexture):
3355 (WebCore::TextureMapperTile::setRect):
3356 (WebCore::TextureMapperTile::~TextureMapperTile):
3357 (WebCore::TextureMapperTile::TextureMapperTile):
3358 * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp: Copied from Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp.
3360 (WebCore::TextureMapperTiledBackingStore::TextureMapperTiledBackingStore):
3361 (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
3362 (WebCore::TextureMapperTiledBackingStore::adjustedTransformForRect):
3363 (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
3364 (WebCore::TextureMapperTiledBackingStore::drawBorder):
3365 (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
3366 (WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded):
3367 (WebCore::TextureMapperTiledBackingStore::updateContents):
3368 (WebCore::TextureMapperTiledBackingStore::texture):
3369 * platform/graphics/texmap/TextureMapperTiledBackingStore.h: Added.
3371 (TextureMapperTiledBackingStore):
3372 (WebCore::TextureMapperTiledBackingStore::create):
3373 (WebCore::TextureMapperTiledBackingStore::~TextureMapperTiledBackingStore):
3374 (WebCore::TextureMapperTiledBackingStore::setContentsToImage):
3375 (WebCore::TextureMapperTiledBackingStore::rect):
3376 * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
3377 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
3379 2013-02-09 Philip Rogers <pdr@google.com>
3381 Sanitize m_keyTimes for paced value animations
3382 https://bugs.webkit.org/show_bug.cgi?id=108828
3384 Reviewed by Dirk Schulze.
3386 SVG animations with calcMode=paced calculate new m_keyTimes in
3387 SVGAnimationElement::calculateKeyTimesForCalcModePaced() because paced animations do not
3388 specify keyTimes. If an error occurs while calculating m_keyTimes, and there exists
3389 user-specified values, a crash could occur because the user-specified values were not
3392 This change clears user-specified keyTimes before calculating new ones.
3394 Test: svg/animations/animate-keytimes-crash.html
3396 * svg/SVGAnimationElement.cpp:
3397 (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
3399 2013-02-09 Eric Seidel <eric@webkit.org>
3401 Fix TextDocumentParser to play nice with threading
3402 https://bugs.webkit.org/show_bug.cgi?id=109240
3404 Reviewed by Adam Barth.
3406 Before the HTML5 parser re-write the text document parser
3407 was completely custom. With the HTML5 parser, we just made
3408 the TextDocumentParser use the HTMLDocumentParser with an
3409 artificial script tag.
3411 However, our solution was slightly over-engineered to avoid
3412 lying about the column numbers of the first line of the text document
3415 This change makes us use a simpler (and threading-compatible)
3416 solution by just inserting a real "<pre>" tag into the
3417 input stream instead of hacking one together with the treebuilder
3418 and manually setting the Tokenizer state.
3420 fast/parser/empty-text-resource.html covers this case.
3422 * html/parser/TextDocumentParser.cpp:
3423 (WebCore::TextDocumentParser::TextDocumentParser):
3424 (WebCore::TextDocumentParser::insertFakePreElement):
3426 2013-02-09 Kent Tamura <tkent@chromium.org>
3428 Add missing copyright header
3429 https://bugs.webkit.org/show_bug.cgi?id=107507
3431 * Resources/pagepopups/chromium/calendarPickerChromium.css:
3432 * Resources/pagepopups/chromium/pickerCommonChromium.css:
3434 2013-02-09 Kent Tamura <tkent@chromium.org>
3436 Fix crash by img[ismap] with content property
3437 https://bugs.webkit.org/show_bug.cgi?id=108702
3439 Reviewed by Adam Barth.
3441 Test: fast/dom/HTMLAnchorElement/anchor-ismap-crash.html
3443 * html/HTMLAnchorElement.cpp:
3444 (WebCore::appendServerMapMousePosition):
3445 Check if the renderer of&nb