1 2013-02-11 Eugene Klyuchnikov <eustas@chromium.org>
3 Web Inspector: [Resources] Prefactorings in DataGrid and CookieTable
4 https://bugs.webkit.org/show_bug.cgi?id=109141
6 Reviewed by Vsevolod Vlasov.
8 1) Make deleteCookie method static and move to WebInspector.Cookie
9 2) Replace resfreshCallback getter/setter in DataGrid with
12 * inspector/front-end/CookieItemsView.js: Adopt changes.
13 * inspector/front-end/CookieParser.js:
14 (WebInspector.Cookie.prototype.remove): Moved from CookiesTable.
15 * inspector/front-end/CookiesTable.js: Adopt changes.
16 * inspector/front-end/DataGrid.js:
17 Replace setter with constructor parameter.
19 2013-02-11 John J. Barton <johnjbarton@chromium.org>
21 Web Inspector: Don't throw exceptions in WebInspector.Color
22 https://bugs.webkit.org/show_bug.cgi?id=104835
24 Reviewed by Vsevolod Vlasov.
26 WebInspector.Color.parse() returns a Color from a string, or null;
27 Ctor calls now call parse();
28 In the StylesSideBarPane, test null rather than catch(e).
30 Added case to inspector/styles/styles-invalid-color-values.html
32 * inspector/front-end/Color.js:
34 (WebInspector.Color.parse):
35 (WebInspector.Color.fromRGBA):
36 (WebInspector.Color.fromRGB):
37 (WebInspector.Color.prototype.toString):
38 (WebInspector.Color.prototype._parse.this.alpha.set 0):
39 (WebInspector.Color.prototype._parse.this.nickname.set 2):
40 (WebInspector.Color.prototype._parse.this.hsla.set 1):
41 (WebInspector.Color.prototype._parse.this.rgba.set 0):
42 (WebInspector.Color.prototype._parse.set WebInspector):
43 (WebInspector.Color.prototype._parse):
44 * inspector/front-end/Spectrum.js:
45 (WebInspector.Spectrum.prototype.get color):
46 * inspector/front-end/StylesSidebarPane.js:
48 2013-02-11 Andrey Lushnikov <lushnikov@chromium.org>
50 Web Inspector: home button behaviour is wrong in DTE
51 https://bugs.webkit.org/show_bug.cgi?id=109154
53 Reviewed by Vsevolod Vlasov.
55 Handle home key shortcut explicitly in TextEditorMainPanel.
57 New test: inspector/editor/text-editor-home-button.html
59 * inspector/front-end/DefaultTextEditor.js:
60 (WebInspector.TextEditorMainPanel.prototype._registerShortcuts):
61 (WebInspector.TextEditorMainPanel.prototype._handleHomeKey):
63 2013-02-11 Abhishek Arya <inferno@chromium.org>
65 Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
66 https://bugs.webkit.org/show_bug.cgi?id=108981
68 Reviewed by Eric Seidel.
70 * Modules/mediastream/RTCStatsResponse.cpp:
71 (WebCore::RTCStatsResponse::addElement):
72 (WebCore::RTCStatsResponse::addStatistic):
73 * Modules/websockets/WebSocketChannel.cpp:
74 (WebCore::WebSocketChannel::skipBuffer):
75 * css/CSSCalculationValue.cpp:
76 (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
77 (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
78 * css/WebKitCSSTransformValue.cpp:
79 (WebCore::transformValueToCssString):
80 * editing/TextIterator.cpp:
81 (WebCore::SearchBuffer::search):
82 * html/HTMLElement.cpp:
83 (WebCore::parseColorStringWithCrazyLegacyRules):
85 (WebCore::ImageData::ImageData):
86 * html/shadow/DateTimeSymbolicFieldElement.cpp:
87 (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
88 * html/track/TextTrackCueList.cpp:
89 (WebCore::TextTrackCueList::add):
90 * platform/SharedBuffer.cpp:
91 (WebCore::SharedBuffer::getSomeData):
92 * platform/SharedBufferChunkReader.cpp:
93 (WebCore::SharedBufferChunkReader::nextChunk):
94 * platform/audio/HRTFDatabase.cpp:
95 (WebCore::HRTFDatabase::getKernelsFromAzimuthElevation):
96 * platform/graphics/GlyphPageTreeNode.cpp:
97 (WebCore::GlyphPageTreeNode::initializePage):
98 * platform/graphics/Region.cpp:
99 (WebCore::Region::Shape::segments_end):
100 * platform/graphics/filters/FEComponentTransfer.cpp:
101 (WebCore::FEComponentTransfer::getValues):
102 * platform/graphics/filters/FilterEffect.cpp:
103 (WebCore::FilterEffect::inputEffect):
104 * platform/text/TextCodecUTF8.cpp:
105 (WebCore::TextCodecUTF8::decode):
106 * platform/text/mac/TextCodecMac.cpp:
107 (WebCore::TextCodecMac::decode):
108 * rendering/RenderBlockLineLayout.cpp:
109 (WebCore::RenderBlock::checkFloatsInCleanLine):
110 * svg/SVGAnimatedTypeAnimator.h:
111 (WebCore::SVGAnimatedTypeAnimator::executeAction):
112 * svg/SVGAnimationElement.cpp:
113 (WebCore::SVGAnimationElement::calculatePercentForSpline):
114 * svg/animation/SVGSMILElement.cpp:
115 (WebCore::SVGSMILElement::findInstanceTime):
117 2013-02-10 Chris Fleizach <cfleizach@apple.com>
119 WebSpeech: Implement basic speaking/finished speaking behavior
120 https://bugs.webkit.org/show_bug.cgi?id=107135
122 Reviewed by Sam Weinig.
124 Implements the basic functionality of speaking utterances.
126 In the WebCore side, it manages the speech queue the way the spec defines
127 (that is, new jobs are appended to a queue and wait for other jobs to finish).
129 On the Mac side, it instantiates a synthesizer and handles the callbacks for when
130 jobs are finished. It sends those jobs back to WebCore to dispatch the right events.
132 Test: platform/mac/fast/speechsynthesis/speech-synthesis-speak.html
134 * Modules/speech/SpeechSynthesis.cpp:
135 (WebCore::SpeechSynthesis::SpeechSynthesis):
136 (WebCore::SpeechSynthesis::paused):
137 (WebCore::SpeechSynthesis::startSpeakingImmediately):
138 (WebCore::SpeechSynthesis::speak):
140 (WebCore::SpeechSynthesis::fireEvent):
141 (WebCore::SpeechSynthesis::handleSpeakingCompleted):
142 (WebCore::SpeechSynthesis::didStartSpeaking):
143 (WebCore::SpeechSynthesis::didFinishSpeaking):
144 (WebCore::SpeechSynthesis::speakingErrorOccurred):
145 * Modules/speech/SpeechSynthesis.h:
147 (WebCore::SpeechSynthesis::speaking):
149 * Modules/speech/SpeechSynthesisEvent.cpp:
150 (WebCore::SpeechSynthesisEvent::create):
152 (WebCore::SpeechSynthesisEvent::SpeechSynthesisEvent):
153 * Modules/speech/SpeechSynthesisEvent.h:
154 (SpeechSynthesisEvent):
155 (WebCore::SpeechSynthesisEvent::interfaceName):
156 * Modules/speech/SpeechSynthesisUtterance.h:
157 (WebCore::SpeechSynthesisUtterance::startTime):
158 (WebCore::SpeechSynthesisUtterance::setStartTime):
159 (SpeechSynthesisUtterance):
160 * platform/PlatformSpeechSynthesisUtterance.cpp:
161 (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
162 * platform/PlatformSpeechSynthesisUtterance.h:
163 (PlatformSpeechSynthesisUtterance):
164 (WebCore::PlatformSpeechSynthesisUtterance::setVolume):
165 (WebCore::PlatformSpeechSynthesisUtterance::setRate):
166 (WebCore::PlatformSpeechSynthesisUtterance::setPitch):
167 (WebCore::PlatformSpeechSynthesisUtterance::startTime):
168 (WebCore::PlatformSpeechSynthesisUtterance::setStartTime):
169 (WebCore::PlatformSpeechSynthesisUtterance::client):
170 * platform/PlatformSpeechSynthesizer.cpp:
171 (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
172 * platform/PlatformSpeechSynthesizer.h:
173 (PlatformSpeechSynthesizerClient):
174 (WebCore::PlatformSpeechSynthesizer::client):
175 (PlatformSpeechSynthesizer):
176 * platform/mac/PlatformSpeechSynthesizerMac.mm:
177 (-[WebSpeechSynthesisWrapper initWithSpeechSynthesizer:WebCore::]):
178 (-[WebSpeechSynthesisWrapper dealloc]):
179 (-[WebSpeechSynthesisWrapper convertRateToWPM:]):
180 (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
181 (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
182 (WebCore::PlatformSpeechSynthesizer::speak):
184 2013-02-10 Eric Seidel <eric@webkit.org>
186 Make the existing HTMLPreloadScanner threading-aware
187 https://bugs.webkit.org/show_bug.cgi?id=107807
189 Reviewed by Adam Barth.
191 The HTMLPreloadScanner and CSSPreloadScanner do a number of things.
192 CSSPreloadScanner is mostly just a helper class for HTMLPreloadScanner.
193 HTMLPreloadScanner runs its own copy of the HTMLTokenizer and uses
194 HTMLTokenizer::updateStateFor to emulate enough of the TreeBuilder
195 to get a realistic stream of tokens. It does some additional TreeBuilder
196 emulation, including tracking template tags and base tags, but mostly
197 just scans the token stream for start-tags and looks for URLs in them.
198 It tracks when it has seen a <style> tag and starts sending all character tokens
199 to the CSSPreloadScanner until a </style> tag is seen.
200 It also (unfortunately) knows some about the loader guts and how to construct
201 a proper CachedResourcRequest and issue a preload.
203 This patch changes the model so that the preload scanners only know how to produce
204 PreloadRequest objects and append them to a passed-in vector.
206 This changes the preload-scanner behavior so that preloads are now all issued in one large
207 batch at the end of scanning, instead of as we hit each resource. It's possible that
208 we'll wait to instead check for preload requests more often, at a possible tradeoff
211 An alternate approach might be to pass in a preload-delegate of sorts which knew how
212 to either build a vector, or send requests immediately. For now the build-a-vector-always
213 approach seems clean, and does not seem to slow down our PerformanceTest microbenchmarks at least.
215 This patch has 2 main pieces:
216 - Remove Document and (and loader) dependencies from HTMLPreloadScanner/CSSPreloadScanner
217 This is done through introduction of a new HTMLResourcePreloader class which holds
218 a Document* and knows how to talk to the CachedResourceLoader.
219 - Clean-up HTMLPreloadScanners token-loop to not be tied to having a Tokenizer.
220 (On a background thead, the HTMLPreloadScanner won't own the tokenizer, it will just
221 be passed in tokens and expected to issue loads if necessary.)
223 This passes all of the LayoutTests using the main thread parser.
225 This patch does not make the HTMLPreloadScanner 100% ready for threading
226 (it still uses AtomicString which is currently not-OK on the parser thread)
227 but it's very close. Two further (already written) patches will complete this.
230 * GNUmakefile.list.am:
233 * WebCore.vcproj/WebCore.vcproj:
234 * WebCore.vcxproj/WebCore.vcxproj:
235 * WebCore.xcodeproj/project.pbxproj:
236 * html/parser/CSSPreloadScanner.cpp:
237 (WebCore::CSSPreloadScanner::CSSPreloadScanner):
238 (WebCore::CSSPreloadScanner::scan):
239 (WebCore::CSSPreloadScanner::emitRule):
240 * html/parser/CSSPreloadScanner.h:
242 * html/parser/HTMLDocumentParser.cpp:
243 (WebCore::HTMLDocumentParser::HTMLDocumentParser):
244 (WebCore::HTMLDocumentParser::pumpTokenizer):
245 (WebCore::HTMLDocumentParser::insert):
246 (WebCore::HTMLDocumentParser::append):
247 (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
248 * html/parser/HTMLDocumentParser.h:
249 (HTMLDocumentParser):
250 * html/parser/HTMLPreloadScanner.cpp:
251 (WebCore::isStartTag):
253 (WebCore::isStartOrEndTag):
254 (WebCore::PreloadTask::processAttributes):
255 (WebCore::PreloadTask::charset):
257 (WebCore::PreloadTask::resourceType):
258 (WebCore::PreloadTask::shouldPreload):
259 (WebCore::PreloadTask::createPreloadRequest):
260 (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
261 (WebCore::HTMLPreloadScanner::scan):
262 (WebCore::HTMLPreloadScanner::processPossibleTemplateTag):
263 (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
264 (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
265 (WebCore::HTMLPreloadScanner::processToken):
266 * html/parser/HTMLPreloadScanner.h:
267 (HTMLPreloadScanner):
268 * html/parser/HTMLResourcePreloader.cpp: Added.
270 (WebCore::isStringSafeToSendToAnotherThread):
271 (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
272 (WebCore::PreloadRequest::completeURL):
273 (WebCore::PreloadRequest::resourceRequest):
274 (WebCore::HTMLResourcePreloader::preload):
275 * html/parser/HTMLResourcePreloader.h: Added.
278 (WebCore::PreloadRequest::create):
279 (WebCore::PreloadRequest::PreloadRequest):
280 (HTMLResourcePreloader):
281 (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
282 (WebCore::HTMLResourcePreloader::createWeakPtr):
283 * loader/cache/CachedResourceRequest.h:
285 2013-02-06 Kentaro Hara <haraken@chromium.org>
287 [V8] Rename isolated() to getWorld(), rename worldForEnteredContextIfIsolated() to worldForEnteredContext()
288 https://bugs.webkit.org/show_bug.cgi?id=109039
290 Reviewed by Adam Barth.
292 This is a follow-up patch for r141983.
293 Rename methods for consistency.
295 No tests. No change in behavior.
297 * bindings/v8/DOMDataStore.cpp:
298 (WebCore::DOMDataStore::current):
299 * bindings/v8/DOMWrapperWorld.h:
300 (WebCore::DOMWrapperWorld::getWorld):
301 * bindings/v8/ScriptController.cpp:
302 (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
303 (WebCore::ScriptController::currentWorldContext):
304 * bindings/v8/V8Binding.h:
305 (WebCore::worldForEnteredContext):
306 * bindings/v8/WorldContextHandle.cpp:
307 (WebCore::WorldContextHandle::WorldContextHandle):
308 * bindings/v8/custom/V8DocumentCustom.cpp:
310 * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
312 * bindings/v8/custom/V8SVGDocumentCustom.cpp:
314 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
315 (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
317 2013-02-10 Alexandre Elias <aelias@chromium.org>
319 [chromium] Fix Android scrollbar size
320 https://bugs.webkit.org/show_bug.cgi?id=109374
322 Reviewed by James Robinson.
324 This shrinks scrollbars to 3 device-independent pixels (usually 6
325 physical pixels) and deletes the edge fade. Although the Android
326 system theme does have an edge fade, it's a much sharper cliff
327 than we had (against black, the colors go 64 -> 64 -> 52 -> 21 -> 0)
328 and I can't perceive any difference compared with no fade at all.
330 No new tests (due for rewrite in a week anyway).
332 * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
334 (WebCore::ScrollbarThemeChromiumAndroid::paintThumb):
336 2013-02-04 Kentaro Hara <haraken@chromium.org>
338 [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise
339 https://bugs.webkit.org/show_bug.cgi?id=108579
341 Reviewed by Adam Barth.
343 Currently V8GCController::m_edenNodes stores a list of nodes whose
344 wrappers have been created since the latest GC. The reason why we
345 needed m_edenNodes is that there was no way to know a list of wrappers
346 in the new space of V8. By using m_edenNodes, we had been approximating
347 'wrappers in the new space' by 'wrappers that have been created since
350 Now V8 provides VisitHandlesForPartialDependence(), with which WebKit
351 can know a list of wrappers in the new space. By using the API, we can
352 remove V8GCController::m_edenNodes. The benefit is that (1) we no longer
353 need to keep m_edenNodes and that (2) it enables more precise minor
354 DOM GC (Remember that m_edenNodes was just an approximation).
356 Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940
357 The benchmark runs 300 iterations, each of which creates 100000 elements.
358 The benchmark measures average, min, median, max and stdev of execution times
359 of the 300 iterations. This will tell us the worst-case overhead of this change.
362 mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms
365 mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms
367 As shown above, I couldn't observe any performance regression.
369 No tests. No change in behavior.
371 * bindings/v8/DOMDataStore.h:
372 (WebCore::DOMDataStore::setWrapperInObject):
373 * bindings/v8/DOMWrapperWorld.h:
375 (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck):
376 * bindings/v8/V8Binding.h:
378 (WebCore::worldForEnteredContextIfIsolated):
379 (WebCore::worldForEnteredContextWithoutContextCheck):
380 * bindings/v8/V8DOMWindowShell.cpp:
381 (WebCore::V8DOMWindowShell::initializeIfNeeded):
382 * bindings/v8/V8GCController.cpp:
385 (MinorGCWrapperVisitor):
386 (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor):
387 (WebCore::MinorGCWrapperVisitor::notifyFinished):
388 (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor):
389 (WebCore::V8GCController::gcPrologue):
390 (WebCore::V8GCController::minorGCPrologue):
391 (WebCore::V8GCController::majorGCPrologue):
392 * bindings/v8/V8GCController.h:
395 2013-02-10 Tim Horton <timothy_horton@apple.com>
397 REGRESSION (r132422): Page content and scrollbars are incorrectly offset after restoring a page from the page cache
398 https://bugs.webkit.org/show_bug.cgi?id=109317
399 <rdar://problem/12649131>
401 Reviewed by Simon Fraser.
403 Mark all scrolling that occurs beneath FrameView::layout as programmatic.
405 Test: platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html
407 * page/FrameView.cpp:
408 (WebCore::FrameView::layout):
410 2013-02-10 Kent Tamura <tkent@chromium.org>
412 [Mac] Fix release build failure by recent reverts
416 2013-02-10 Philippe Normand <pnormand@igalia.com>
418 [GStreamer] media/video-controls-fullscreen-volume.html crashes
419 https://bugs.webkit.org/show_bug.cgi?id=108682
421 Reviewed by Martin Robinson.
423 Clean up various signal handlers and avoid bad interaction between
424 the FullscreenVideoControllerGStreamer and its subclasses,
425 especially when the platform video window is created.
427 * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp:
428 (WebCore::FullscreenVideoControllerGStreamer::enterFullscreen):
429 Initialize the window before connecting to the volume/mute
430 signals. This ensures that the signals won't ever interfere with
431 an inexisting window.
432 * platform/graphics/gstreamer/GStreamerGWorld.cpp:
433 (WebCore::GStreamerGWorld::~GStreamerGWorld): Remove GstBus
434 synchronous handler function.
435 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
436 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
437 (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
438 Disconnect from volume/mute signals.
439 (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
440 Keep a trace of volume/mute signal handlers.
441 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
442 Various forward type declarations to avoid un-necessary header includes.
443 (MediaPlayerPrivateGStreamerBase):
444 * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
445 (WebCore::FullscreenVideoControllerGtk::FullscreenVideoControllerGtk):
446 (WebCore::FullscreenVideoControllerGtk::volumeChanged): Bail out
447 if volume button hasn't been created yet.
448 (WebCore::FullscreenVideoControllerGtk::muteChanged): Ditto.
450 2013-02-10 Andreas Kling <akling@apple.com>
452 RenderStyle should use copy-on-write inheritance for NinePieceImage.
453 <http://webkit.org/b/109366>
455 Reviewed by Antti Koivisto.
457 Refactor NinePieceImage to hold a copy-on-write DataRef like other RenderStyle substructures.
458 This allows us to avoids copying the NinePieceImageData when one RenderStyle inherits from another
459 but modifies something in the substructure holding the NinePieceImage (typically StyleSurroundData.)
461 Also made RenderStyle not copy-on-write its StyleSurroundData prematurely when doing a no-op write
462 to a border-image related value.
464 1.23 MB progression on Membuster3.
466 * rendering/style/NinePieceImage.cpp:
467 (WebCore::defaultData):
468 (WebCore::NinePieceImage::NinePieceImage):
469 (WebCore::NinePieceImageData::NinePieceImageData):
470 (WebCore::NinePieceImageData::operator==):
471 * rendering/style/NinePieceImage.h:
472 (WebCore::NinePieceImageData::create):
473 (WebCore::NinePieceImageData::copy):
474 (NinePieceImageData):
476 (WebCore::NinePieceImage::operator==):
477 (WebCore::NinePieceImage::operator!=):
478 (WebCore::NinePieceImage::hasImage):
479 (WebCore::NinePieceImage::image):
480 (WebCore::NinePieceImage::setImage):
481 (WebCore::NinePieceImage::imageSlices):
482 (WebCore::NinePieceImage::setImageSlices):
483 (WebCore::NinePieceImage::fill):
484 (WebCore::NinePieceImage::setFill):
485 (WebCore::NinePieceImage::borderSlices):
486 (WebCore::NinePieceImage::setBorderSlices):
487 (WebCore::NinePieceImage::outset):
488 (WebCore::NinePieceImage::setOutset):
489 (WebCore::NinePieceImage::horizontalRule):
490 (WebCore::NinePieceImage::setHorizontalRule):
491 (WebCore::NinePieceImage::verticalRule):
492 (WebCore::NinePieceImage::setVerticalRule):
493 (WebCore::NinePieceImage::copyImageSlicesFrom):
494 (WebCore::NinePieceImage::copyBorderSlicesFrom):
495 (WebCore::NinePieceImage::copyOutsetFrom):
496 (WebCore::NinePieceImage::copyRepeatFrom):
497 (WebCore::NinePieceImage::setMaskDefaults):
498 (WebCore::NinePieceImage::computeOutset):
499 * rendering/style/RenderStyle.cpp:
500 (WebCore::RenderStyle::setBorderImageSource):
501 (WebCore::RenderStyle::setBorderImageSlices):
502 (WebCore::RenderStyle::setBorderImageWidth):
503 (WebCore::RenderStyle::setBorderImageOutset):
504 * rendering/style/RenderStyle.h:
506 2013-02-10 Kent Tamura <tkent@chromium.org>
508 Unreviewed, rolling out r142343.
509 http://trac.webkit.org/changeset/142343
510 https://bugs.webkit.org/show_bug.cgi?id=108284
512 It might make inspector/profiler/selector-profiler-url.html
518 * html/HTMLPlugInElement.cpp:
519 (WebCore::HTMLPlugInElement::defaultEventHandler):
520 * html/HTMLPlugInImageElement.cpp:
521 (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
522 (WebCore::HTMLPlugInImageElement::createRenderer):
523 (WebCore::HTMLPlugInImageElement::willRecalcStyle):
524 (WebCore::HTMLPlugInImageElement::updateSnapshot):
525 (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
526 (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
527 * html/HTMLPlugInImageElement.h:
529 (HTMLPlugInImageElement):
530 * page/ChromeClient.h:
531 (WebCore::ChromeClient::plugInStartLabelImage):
532 * platform/LocalizedStrings.cpp:
533 * platform/LocalizedStrings.h:
534 * platform/blackberry/LocalizedStringsBlackBerry.cpp:
535 * platform/chromium/LocalizedStringsChromium.cpp:
536 * platform/efl/LocalizedStringsEfl.cpp:
538 * platform/gtk/LocalizedStringsGtk.cpp:
540 * platform/qt/LocalizedStringsQt.cpp:
541 * rendering/RenderSnapshottedPlugIn.cpp:
543 (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
544 (WebCore::RenderSnapshottedPlugIn::paint):
545 (WebCore::RenderSnapshottedPlugIn::paintReplaced):
546 (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
547 (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshot):
548 (WebCore::RenderSnapshottedPlugIn::startLabelImage):
549 (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshotWithLabel):
550 (WebCore::RenderSnapshottedPlugIn::getCursor):
551 (WebCore::RenderSnapshottedPlugIn::handleEvent):
552 (WebCore::RenderSnapshottedPlugIn::tryToFitStartLabel):
553 * rendering/RenderSnapshottedPlugIn.h:
555 2013-02-10 Andreas Kling <akling@apple.com>
557 RenderText: Access characters through m_text instead of caching data pointers separately.
558 <http://webkit.org/b/109357>
560 Reviewed by Antti Koivisto.
562 Go through RenderText::m_text.impl() instead of caching the character data pointer.
563 RenderText should never have a null String in m_text so it's safe to access impl() directly.
564 We have assertions for this since before.
566 Removing this pointer shrinks RenderText by 8 bytes, allowing it to fit into a snugger size class.
567 749 KB progression on Membuster3.
569 * rendering/RenderText.cpp:
570 (SameSizeAsRenderText):
571 (WebCore::RenderText::RenderText):
572 (WebCore::RenderText::setTextInternal):
573 * rendering/RenderText.h:
574 (WebCore::RenderText::is8Bit):
575 (WebCore::RenderText::characters8):
576 (WebCore::RenderText::characters16):
577 (WebCore::RenderText::characterAt):
578 (WebCore::RenderText::operator[]):
581 2013-02-10 Jae Hyun Park <jae.park08@gmail.com>
583 Rename ENABLE(GLIB_SUPPORT) to USE(GLIB)
584 https://bugs.webkit.org/show_bug.cgi?id=104266
586 Reviewed by Philippe Normand.
588 Using USE(GLIB) instead of ENABLE(GLIB_SUPPORT) is more consistent with
589 the existing macro naming conventions.
592 USE() - use a particular third-party library or optional OS service
593 ENABLE() - turn on a specific feature of WebKit
595 No new tests, no new functionality.
599 2013-02-10 Zan Dobersek <zdobersek@igalia.com>
601 [GTK] Build errors in TextureMapperShaderProgram.cpp when compiling with Clang
602 https://bugs.webkit.org/show_bug.cgi?id=109321
604 Reviewed by Noam Rosenthal.
606 Clang is reporting errors due to non-constant expressions that cannot be narrowed
607 from double to float type in initializer list when constructing a matrix of GC3Dfloat
608 numbers. To avoid this every parameter is passed through an explicit GC3Dfloat constructor.
610 No new tests - no new functionality.
612 * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
613 (WebCore::TextureMapperShaderProgram::setMatrix):
615 2013-02-10 Philippe Normand <pnormand@igalia.com>
617 [GStreamer] audio is muted when playback rate is between 0.8 and 2.0
618 https://bugs.webkit.org/show_bug.cgi?id=109362
620 Reviewed by Martin Robinson.
622 Don't mute sound if the audio pitch is preserved. If this is not
623 the case mute it if it's too extreme, as the HTML5 spec recommends.
625 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
626 (WebCore::MediaPlayerPrivateGStreamer::setRate):
628 2013-02-09 Dominic Mazzoni <dmazzoni@google.com>
630 fast/encoding/parser-tests-*.html tests sometimes crash
631 https://bugs.webkit.org/show_bug.cgi?id=108058
633 Reviewed by Chris Fleizach.
635 To avoid calling accessibilityIsIgnored while the render
636 tree is unstable, call accessibilityIsIgnored in the
637 notification timer handler, only for childrenChanged
640 This exposed a problem where notifications queued on
641 objects can fire after the object has been deleted; fix that
642 by checking the object's id, which is always set to 0 when
643 removed from the tree.
645 Covered by existing tests.
647 * accessibility/AXObjectCache.cpp:
648 (WebCore::AXObjectCache::childrenChanged):
649 (WebCore::AXObjectCache::notificationPostTimerFired):
651 2013-02-09 Eric Carlson <eric.carlson@apple.com>
653 [Mac] Do not assume MediaAccessibility framework is installed
654 https://bugs.webkit.org/show_bug.cgi?id=109365
656 Reviewed by Sam Weinig.
658 * page/CaptionUserPreferencesMac.h:
659 * page/CaptionUserPreferencesMac.mm:
660 (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Call the base class if the framework
662 (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
663 (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
664 (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Ditto.
665 (WebCore::CaptionUserPreferencesMac::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
666 (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Ditto.
667 (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
668 (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
669 (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto.
671 2013-02-09 Dominic Mazzoni <dmazzoni@google.com>
673 AX: move isIgnored caching to AXObject
674 https://bugs.webkit.org/show_bug.cgi?id=109322
676 Reviewed by Chris Fleizach.
678 There's some benefit to caching accessibilityIsIgnored
679 (using AXComputedObjectAttributeCache) for more than just
680 AXRenderObject, so move the caching code to AXObject.
682 AXObject now has a protected virtual method
683 computeAccessibilityIsIgnored, and all subclasses
684 override that instead.
688 * accessibility/AccessibilityImageMapLink.h:
689 (AccessibilityImageMapLink):
690 (WebCore::AccessibilityImageMapLink::computeAccessibilityIsIgnored):
691 * accessibility/AccessibilityList.cpp:
692 (WebCore::AccessibilityList::computeAccessibilityIsIgnored):
693 * accessibility/AccessibilityList.h:
695 * accessibility/AccessibilityListBox.cpp:
696 (WebCore::AccessibilityListBox::computeAccessibilityIsIgnored):
697 * accessibility/AccessibilityListBox.h:
698 (AccessibilityListBox):
699 * accessibility/AccessibilityListBoxOption.cpp:
700 (WebCore::AccessibilityListBoxOption::computeAccessibilityIsIgnored):
701 * accessibility/AccessibilityListBoxOption.h:
702 (AccessibilityListBoxOption):
703 * accessibility/AccessibilityMediaControls.cpp:
704 (WebCore::AccessibilityMediaControl::computeAccessibilityIsIgnored):
705 (WebCore::AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored):
706 * accessibility/AccessibilityMediaControls.h:
707 (AccessibilityMediaControl):
708 (WebCore::AccessibilityMediaControlsContainer::computeAccessibilityIsIgnored):
709 (AccessibilityMediaTimeDisplay):
710 * accessibility/AccessibilityMenuList.h:
711 (WebCore::AccessibilityMenuList::computeAccessibilityIsIgnored):
712 * accessibility/AccessibilityMenuListOption.cpp:
713 (WebCore::AccessibilityMenuListOption::computeAccessibilityIsIgnored):
714 * accessibility/AccessibilityMenuListOption.h:
715 (AccessibilityMenuListOption):
716 * accessibility/AccessibilityMenuListPopup.cpp:
717 (WebCore::AccessibilityMenuListPopup::computeAccessibilityIsIgnored):
718 * accessibility/AccessibilityMenuListPopup.h:
719 (AccessibilityMenuListPopup):
720 * accessibility/AccessibilityNodeObject.cpp:
721 (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):
722 * accessibility/AccessibilityNodeObject.h:
723 (AccessibilityNodeObject):
724 * accessibility/AccessibilityObject.cpp:
725 (WebCore::AccessibilityObject::accessibilityIsIgnored):
727 * accessibility/AccessibilityObject.h:
728 (AccessibilityObject):
729 (WebCore::AccessibilityObject::computeAccessibilityIsIgnored):
730 * accessibility/AccessibilityProgressIndicator.cpp:
731 (WebCore::AccessibilityProgressIndicator::computeAccessibilityIsIgnored):
732 * accessibility/AccessibilityProgressIndicator.h:
733 (AccessibilityProgressIndicator):
734 * accessibility/AccessibilityRenderObject.cpp:
735 (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
736 * accessibility/AccessibilityRenderObject.h:
737 (AccessibilityRenderObject):
738 * accessibility/AccessibilityScrollView.cpp:
739 (WebCore::AccessibilityScrollView::computeAccessibilityIsIgnored):
740 * accessibility/AccessibilityScrollView.h:
741 (AccessibilityScrollView):
742 * accessibility/AccessibilityScrollbar.h:
743 (WebCore::AccessibilityScrollbar::computeAccessibilityIsIgnored):
744 * accessibility/AccessibilitySlider.cpp:
745 (WebCore::AccessibilitySlider::computeAccessibilityIsIgnored):
746 (WebCore::AccessibilitySliderThumb::computeAccessibilityIsIgnored):
747 * accessibility/AccessibilitySlider.h:
748 (AccessibilitySlider):
749 (AccessibilitySliderThumb):
750 * accessibility/AccessibilitySpinButton.h:
751 (WebCore::AccessibilitySpinButton::computeAccessibilityIsIgnored):
752 (WebCore::AccessibilitySpinButtonPart::computeAccessibilityIsIgnored):
753 * accessibility/AccessibilityTable.cpp:
754 (WebCore::AccessibilityTable::computeAccessibilityIsIgnored):
755 * accessibility/AccessibilityTable.h:
756 (AccessibilityTable):
757 * accessibility/AccessibilityTableCell.cpp:
758 (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
759 * accessibility/AccessibilityTableCell.h:
760 (AccessibilityTableCell):
761 * accessibility/AccessibilityTableColumn.cpp:
762 (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
763 * accessibility/AccessibilityTableColumn.h:
764 (AccessibilityTableColumn):
765 * accessibility/AccessibilityTableHeaderContainer.cpp:
766 (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
767 * accessibility/AccessibilityTableHeaderContainer.h:
768 (AccessibilityTableHeaderContainer):
769 * accessibility/AccessibilityTableRow.cpp:
770 (WebCore::AccessibilityTableRow::computeAccessibilityIsIgnored):
771 * accessibility/AccessibilityTableRow.h:
772 (AccessibilityTableRow):
774 2013-02-09 David Farler <dfarler@apple.com>
776 Make TestWebKitAPI work for iOS
777 https://bugs.webkit.org/show_bug.cgi?id=108978
779 Reviewed by David Kilzer.
781 Tests already exist - refactor only.
783 * WebCore.exp.in: Lumped __ZNK7WebCore4KURL7hasPathEv with related methods.
784 * platform/KURL.cpp: Inlined hasPath() into the header
785 * platform/KURL.h: Inlined hasPath() into the header
787 2013-02-09 Adam Barth <abarth@webkit.org>
789 Load event fires too early with threaded HTML parser
790 https://bugs.webkit.org/show_bug.cgi?id=108984
792 Reviewed by Eric Seidel.
794 Previously, the DocumentLoader would always be on the stack when the
795 HTMLDocumentParser was processing data from the network. The
796 DocumentLoader would then tell isLoadingInAPISense not to fire the load
797 event. Now that we process data asynchronously with the threaded
798 parser, the DocumentLoader is not always on the stack, which means we
799 need to delay the load event using the clause that asks the parser
800 whether it is processing data.
802 Unfortunately, that clause is fragile because we can check for load
803 completion while we're switching parsers between the network-created
804 parser and a script-created parser. To avoid accidentially triggerin
805 the load event during these "gaps," this patch introduces a counter on
806 document to record how many parsers are active on the stack. While
807 that numer is non-zero, we'll delay the load event. When that number
808 reaches zero, we'll check for load complete.
810 That last step is required because the DocumentLoader::finishLoading
811 method is no longer guarunteed to check for load complete after calling
812 finish on the parser because the finish operation might complete
815 After this patch, the threaded parser passes all but four fast/parser
819 (WebCore::Document::Document):
820 (WebCore::Document::hasActiveParser):
822 (WebCore::Document::decrementActiveParserCount):
825 (WebCore::Document::incrementActiveParserCount):
826 * html/parser/HTMLDocumentParser.cpp:
827 (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
828 (WebCore::HTMLDocumentParser::pumpTokenizer):
829 * html/parser/HTMLParserScheduler.cpp:
830 (WebCore::ActiveParserSession::ActiveParserSession):
832 (WebCore::ActiveParserSession::~ActiveParserSession):
833 (WebCore::PumpSession::PumpSession):
834 (WebCore::PumpSession::~PumpSession):
835 * html/parser/HTMLParserScheduler.h:
837 (ActiveParserSession):
839 * loader/DocumentLoader.cpp:
840 (WebCore::DocumentLoader::isLoadingInAPISense):
842 2013-02-09 Mike West <mkwst@chromium.org>
844 Use IGNORE_EXCEPTION for initialized, but unused, ExceptionCodes.
845 https://bugs.webkit.org/show_bug.cgi?id=109295
847 Reviewed by Darin Adler.
849 The monster patch in http://wkbug.com/108771 missed an entire class of
850 ignored exceptions. It only dealt with call sites that never initialized
851 the ExceptionCode variable, on the assumption that only such call sites
852 would ignore the variable's value.
854 That was a flawed assumption: a large number of sites that initialize the
855 ExceptionCode to 0 ignore it regardless. This patch deals with the
856 almost-as-large set of callsites that initialize the variable, pass it to
857 a function, and then never touch it again.
859 * Modules/indexeddb/IDBDatabase.cpp:
860 (WebCore::IDBDatabase::forceClose):
861 * accessibility/AccessibilityRenderObject.cpp:
862 (WebCore::AccessibilityRenderObject::ariaSelectedTextRange):
863 (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
864 (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
865 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
866 (getSelectionOffsetsForObject):
867 * accessibility/atk/WebKitAccessibleUtil.cpp:
868 (selectionBelongsToObject):
870 (WebCore::Node::textRects):
871 * editing/DeleteButtonController.cpp:
872 (WebCore::DeleteButtonController::hide):
873 * editing/EditingStyle.cpp:
874 (WebCore::EditingStyle::styleAtSelectionStart):
875 * editing/Editor.cpp:
876 (WebCore::Editor::canDeleteRange):
877 (WebCore::Editor::pasteAsPlainText):
878 (WebCore::Editor::pasteAsFragment):
879 (WebCore::Editor::shouldDeleteRange):
880 (WebCore::Editor::dispatchCPPEvent):
881 (WebCore::Editor::setComposition):
882 (WebCore::Editor::advanceToNextMisspelling):
883 (WebCore::isFrameInRange):
884 * editing/EditorCommand.cpp:
885 (WebCore::expandSelectionToGranularity):
886 * editing/MergeIdenticalElementsCommand.cpp:
887 (WebCore::MergeIdenticalElementsCommand::doApply):
888 * editing/SplitElementCommand.cpp:
889 (WebCore::SplitElementCommand::doUnapply):
890 * editing/SplitTextNodeCommand.cpp:
891 (WebCore::SplitTextNodeCommand::doApply):
892 * editing/TextCheckingHelper.cpp:
893 (WebCore::expandToParagraphBoundary):
894 (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
895 (WebCore::TextCheckingHelper::isUngrammatical):
896 (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
897 * editing/TextInsertionBaseCommand.cpp:
898 (WebCore::dispatchBeforeTextInsertedEvent):
899 (WebCore::canAppendNewLineFeedToSelection):
900 * editing/TextIterator.cpp:
901 (WebCore::findPlainText):
902 * editing/htmlediting.cpp:
903 (WebCore::extendRangeToWrappingNodes):
904 (WebCore::isNodeVisiblyContainedWithin):
905 * editing/visible_units.cpp:
906 (WebCore::nextBoundary):
907 * html/FileInputType.cpp:
908 (WebCore::FileInputType::createShadowSubtree):
909 * html/HTMLKeygenElement.cpp:
910 (WebCore::HTMLKeygenElement::HTMLKeygenElement):
911 * html/HTMLScriptElement.cpp:
912 (WebCore::HTMLScriptElement::setText):
913 * html/HTMLTitleElement.cpp:
914 (WebCore::HTMLTitleElement::setText):
915 * html/HTMLTrackElement.cpp:
916 (WebCore::HTMLTrackElement::didCompleteLoad):
917 * html/RangeInputType.cpp:
918 (WebCore::RangeInputType::createShadowSubtree):
919 * html/SearchInputType.cpp:
920 (WebCore::SearchInputType::createShadowSubtree):
921 * html/TextFieldInputType.cpp:
922 (WebCore::TextFieldInputType::createShadowSubtree):
923 * html/track/TextTrackList.cpp:
924 (TextTrackList::asyncEventTimerFired):
925 * inspector/DOMPatchSupport.cpp:
926 (WebCore::DOMPatchSupport::patchDocument):
927 * inspector/InspectorDatabaseAgent.cpp:
929 * inspector/InspectorFileSystemAgent.cpp:
931 * page/DOMSelection.cpp:
932 (WebCore::DOMSelection::addRange):
933 * page/DragController.cpp:
934 (WebCore::DragController::dispatchTextInputEventFor):
935 * page/EventHandler.cpp:
936 (WebCore::EventHandler::dispatchMouseEvent):
937 (WebCore::EventHandler::handleTouchEvent):
938 * page/FrameActionScheduler.cpp:
939 (WebCore::EventFrameAction::fire):
940 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
941 (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
942 * svg/SVGDocument.cpp:
943 (WebCore::SVGDocument::dispatchZoomEvent):
944 (WebCore::SVGDocument::dispatchScrollEvent):
946 (WebCore::SVGLength::SVGLength):
947 (WebCore::SVGLength::value):
948 * xml/parser/XMLDocumentParser.cpp:
949 (WebCore::XMLDocumentParser::exitText):
950 * xml/parser/XMLDocumentParserQt.cpp:
951 (WebCore::XMLDocumentParser::parse):
952 (WebCore::XMLDocumentParser::startDocument):
953 (WebCore::XMLDocumentParser::parseCharacters):
955 2013-02-09 Stephen White <senorblanco@chromium.org>
957 [skia] Fix memory management in SkiaImageFilterBuilder and friends.
958 https://bugs.webkit.org/show_bug.cgi?id=109326
960 Sadly, skia has no official ref-counted pointers, so we must make do
963 Reviewed by James Robinson.
965 Correctness covered by existing tests in css3/filters.
967 * platform/graphics/filters/skia/FEBlendSkia.cpp:
968 (WebCore::FEBlend::createImageFilter):
969 * platform/graphics/filters/skia/FEComponentTransferSkia.cpp:
970 (WebCore::FEComponentTransfer::createImageFilter):
971 * platform/graphics/filters/skia/FELightingSkia.cpp:
972 (WebCore::FELighting::createImageFilter):
973 Adopt refs produced by the build() pass with SkAutoTUnref.
974 * platform/graphics/filters/skia/SkiaImageFilterBuilder.cpp:
975 (WebCore::SkiaImageFilterBuilder::~SkiaImageFilterBuilder):
976 Unref the builder's hashmap effect pointers.
977 (WebCore::SkiaImageFilterBuilder::build):
978 Ref the pointer returned to the caller, and use SkAutoTUnref
979 internally while building the tree.
980 * platform/graphics/filters/skia/SkiaImageFilterBuilder.h:
981 (SkiaImageFilterBuilder):
982 Add a destructor to SkiaImageFilterBuilder.
985 2013-02-09 Dominic Mazzoni <dmazzoni@google.com>
987 AX: Rename AXObject::cachedIsIgnoredValue to lastKnownIsIgnoredValue
988 https://bugs.webkit.org/show_bug.cgi?id=108238
990 Reviewed by Chris Fleizach.
992 Simple refactoring, no new tests.
994 * accessibility/AXObjectCache.cpp:
995 (WebCore::AXObjectCache::getOrCreate):
996 (WebCore::AXObjectCache::childrenChanged):
997 * accessibility/AccessibilityObject.cpp:
998 (WebCore::AccessibilityObject::AccessibilityObject):
999 (WebCore::AccessibilityObject::lastKnownIsIgnoredValue):
1000 (WebCore::AccessibilityObject::setLastKnownIsIgnoredValue):
1001 (WebCore::AccessibilityObject::notifyIfIgnoredValueChanged):
1002 * accessibility/AccessibilityObject.h:
1003 (AccessibilityObject):
1005 2013-02-09 Anton Vayvod <avayvod@chromium.org>
1007 [Text Autosizing] Cleanup change: converter the pointer argument to be a reference since
1008 non-null pointer is always expected.
1009 https://bugs.webkit.org/show_bug.cgi?id=109079
1011 Reviewed by Kenneth Rohde Christiansen.
1013 Cleanup change, no need to add new tests or modify the existing ones.
1015 * rendering/TextAutosizer.cpp:
1017 Changed parameter from a pointer to a reference in the methods below.
1019 (WebCore::TextAutosizer::processSubtree):
1020 (WebCore::TextAutosizer::processCluster):
1021 (WebCore::TextAutosizer::processContainer):
1022 (WebCore::TextAutosizer::isNarrowDescendant):
1023 (WebCore::TextAutosizer::isWiderDescendant):
1024 (WebCore::TextAutosizer::isAutosizingCluster):
1025 (WebCore::TextAutosizer::clusterShouldBeAutosized):
1026 (WebCore::TextAutosizer::measureDescendantTextWidth):
1028 * rendering/TextAutosizer.h: updated method prototypes.
1030 2013-02-09 Rafael Brandao <rafael.lobo@openbossa.org>
1032 [TexMap] Separate classes per file in TextureMapperBackingStore.h
1033 https://bugs.webkit.org/show_bug.cgi?id=109333
1035 Reviewed by Noam Rosenthal.
1037 TextureMapperBackingStore.h had the classes TextureMapperBackingStore,
1038 TextureMapperTiledBackingStore, TextureMapperSurfaceBackingStore and
1039 TextureMapperTile which was quite confusing. Now each one has its
1040 own header and its own source file.
1042 No new tests needed, refactoring only.
1045 * GNUmakefile.list.am:
1048 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1049 * platform/graphics/texmap/TextureMapperBackingStore.cpp:
1050 * platform/graphics/texmap/TextureMapperBackingStore.h:
1051 * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp: Added.
1053 (WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface):
1054 (WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded):
1055 (WebCore::TextureMapperSurfaceBackingStore::texture):
1056 (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
1057 * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h: Added.
1059 (TextureMapperSurfaceBackingStore):
1060 (WebCore::TextureMapperSurfaceBackingStore::create):
1061 (WebCore::TextureMapperSurfaceBackingStore::~TextureMapperSurfaceBackingStore):
1062 (WebCore::TextureMapperSurfaceBackingStore::TextureMapperSurfaceBackingStore):
1063 * platform/graphics/texmap/TextureMapperTile.cpp: Added.
1065 (WebCore::TextureMapperTile::updateContents):
1066 (WebCore::TextureMapperTile::paint):
1067 * platform/graphics/texmap/TextureMapperTile.h: Added.
1069 (TextureMapperTile):
1070 (WebCore::TextureMapperTile::texture):
1071 (WebCore::TextureMapperTile::rect):
1072 (WebCore::TextureMapperTile::setTexture):
1073 (WebCore::TextureMapperTile::setRect):
1074 (WebCore::TextureMapperTile::~TextureMapperTile):
1075 (WebCore::TextureMapperTile::TextureMapperTile):
1076 * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp: Copied from Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp.
1078 (WebCore::TextureMapperTiledBackingStore::TextureMapperTiledBackingStore):
1079 (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
1080 (WebCore::TextureMapperTiledBackingStore::adjustedTransformForRect):
1081 (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
1082 (WebCore::TextureMapperTiledBackingStore::drawBorder):
1083 (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
1084 (WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded):
1085 (WebCore::TextureMapperTiledBackingStore::updateContents):
1086 (WebCore::TextureMapperTiledBackingStore::texture):
1087 * platform/graphics/texmap/TextureMapperTiledBackingStore.h: Added.
1089 (TextureMapperTiledBackingStore):
1090 (WebCore::TextureMapperTiledBackingStore::create):
1091 (WebCore::TextureMapperTiledBackingStore::~TextureMapperTiledBackingStore):
1092 (WebCore::TextureMapperTiledBackingStore::setContentsToImage):
1093 (WebCore::TextureMapperTiledBackingStore::rect):
1094 * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
1095 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1097 2013-02-09 Philip Rogers <pdr@google.com>
1099 Sanitize m_keyTimes for paced value animations
1100 https://bugs.webkit.org/show_bug.cgi?id=108828
1102 Reviewed by Dirk Schulze.
1104 SVG animations with calcMode=paced calculate new m_keyTimes in
1105 SVGAnimationElement::calculateKeyTimesForCalcModePaced() because paced animations do not
1106 specify keyTimes. If an error occurs while calculating m_keyTimes, and there exists
1107 user-specified values, a crash could occur because the user-specified values were not
1110 This change clears user-specified keyTimes before calculating new ones.
1112 Test: svg/animations/animate-keytimes-crash.html
1114 * svg/SVGAnimationElement.cpp:
1115 (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
1117 2013-02-09 Eric Seidel <eric@webkit.org>
1119 Fix TextDocumentParser to play nice with threading
1120 https://bugs.webkit.org/show_bug.cgi?id=109240
1122 Reviewed by Adam Barth.
1124 Before the HTML5 parser re-write the text document parser
1125 was completely custom. With the HTML5 parser, we just made
1126 the TextDocumentParser use the HTMLDocumentParser with an
1127 artificial script tag.
1129 However, our solution was slightly over-engineered to avoid
1130 lying about the column numbers of the first line of the text document
1133 This change makes us use a simpler (and threading-compatible)
1134 solution by just inserting a real "<pre>" tag into the
1135 input stream instead of hacking one together with the treebuilder
1136 and manually setting the Tokenizer state.
1138 fast/parser/empty-text-resource.html covers this case.
1140 * html/parser/TextDocumentParser.cpp:
1141 (WebCore::TextDocumentParser::TextDocumentParser):
1142 (WebCore::TextDocumentParser::insertFakePreElement):
1144 2013-02-09 Kent Tamura <tkent@chromium.org>
1146 Add missing copyright header
1147 https://bugs.webkit.org/show_bug.cgi?id=107507
1149 * Resources/pagepopups/chromium/calendarPickerChromium.css:
1150 * Resources/pagepopups/chromium/pickerCommonChromium.css:
1152 2013-02-09 Kent Tamura <tkent@chromium.org>
1154 Fix crash by img[ismap] with content property
1155 https://bugs.webkit.org/show_bug.cgi?id=108702
1157 Reviewed by Adam Barth.
1159 Test: fast/dom/HTMLAnchorElement/anchor-ismap-crash.html
1161 * html/HTMLAnchorElement.cpp:
1162 (WebCore::appendServerMapMousePosition):
1163 Check if the renderer of an img element is RenderImage.
1165 2013-02-09 Mike West <mkwst@chromium.org>
1167 Drop ExceptionCode from IDB's directionToString and modeToString.
1168 https://bugs.webkit.org/show_bug.cgi?id=109143
1170 Reviewed by Jochen Eisinger.
1172 No caller of either IDBCursor::directionToString or
1173 IDBTransaction::modeToString makes use of the ExceptionCode these
1174 methods require. This patch removes the 'ExceptionCode&' parameter from
1175 both methods and their callsites.
1177 * Modules/indexeddb/IDBCursor.cpp:
1178 (WebCore::IDBCursor::direction):
1179 (WebCore::IDBCursor::directionToString):
1180 Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
1181 exception previously generated with ASSERT_NOT_REACHED.
1182 * Modules/indexeddb/IDBCursor.h:
1183 * Modules/indexeddb/IDBTransaction.cpp:
1184 (WebCore::IDBTransaction::mode):
1185 (WebCore::IDBTransaction::modeToString):
1186 Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
1187 exception previously generated with ASSERT_NOT_REACHED.
1188 * Modules/indexeddb/IDBTransaction.h:
1190 2013-02-09 Kondapally Kalyan <kalyan.kondapally@intel.com>
1192 [EFL][Qt][WebGL] Share the common code between GraphicsSurfaceGLX and X11WindowResources.
1193 https://bugs.webkit.org/show_bug.cgi?id=106666
1195 Reviewed by Kenneth Rohde Christiansen.
1197 Covered by existing WebGL tests.
1199 This patch removes any duplicate code in X11WindowResources and
1200 GraphicsSurfaceGLX. No new functionality is added.
1202 * PlatformEfl.cmake:
1204 * platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
1205 (WebCore::EGLConfigSelector::pixmapContextConfig):
1206 * platform/graphics/surfaces/egl/EGLConfigSelector.h:
1207 (EGLConfigSelector):
1208 * platform/graphics/surfaces/egl/EGLSurface.cpp:
1209 (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
1210 (WebCore::EGLWindowTransportSurface::destroy):
1211 (WebCore::EGLWindowTransportSurface::setGeometry):
1212 * platform/graphics/surfaces/egl/EGLSurface.h:
1214 (EGLWindowTransportSurface):
1215 * platform/graphics/surfaces/glx/GLXConfigSelector.h:
1216 (WebCore::GLXConfigSelector::GLXConfigSelector):
1217 (WebCore::GLXConfigSelector::visualInfo):
1218 (WebCore::GLXConfigSelector::pBufferContextConfig):
1219 (WebCore::GLXConfigSelector::createSurfaceConfig):
1220 (GLXConfigSelector):
1221 * platform/graphics/surfaces/glx/GLXContext.cpp:
1222 (WebCore::initializeARBExtensions):
1223 (WebCore::GLXOffScreenContext::GLXOffScreenContext):
1224 (WebCore::GLXOffScreenContext::initialize):
1225 (WebCore::GLXOffScreenContext::platformReleaseCurrent):
1226 (WebCore::GLXOffScreenContext::freeResources):
1227 * platform/graphics/surfaces/glx/GLXContext.h:
1228 (GLXOffScreenContext):
1229 * platform/graphics/surfaces/glx/GLXSurface.cpp:
1230 (WebCore::GLXTransportSurface::GLXTransportSurface):
1231 (WebCore::GLXTransportSurface::setGeometry):
1232 (WebCore::GLXTransportSurface::destroy):
1233 (WebCore::GLXPBuffer::initialize):
1234 * platform/graphics/surfaces/glx/GLXSurface.h:
1235 (GLXTransportSurface):
1237 * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
1239 (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1240 (WebCore::GraphicsSurfacePrivate::initialize):
1241 (GraphicsSurfacePrivate):
1242 (WebCore::GraphicsSurfacePrivate::createSurface):
1243 (WebCore::GraphicsSurfacePrivate::createPixmap):
1244 (WebCore::GraphicsSurfacePrivate::display):
1245 (WebCore::GraphicsSurfacePrivate::flags):
1246 (WebCore::GraphicsSurfacePrivate::clear):
1247 (WebCore::GraphicsSurface::platformPaintToTextureMapper):
1248 No new functionality added. Made changes to take the common code into use.
1250 * platform/graphics/surfaces/glx/X11WindowResources.h: Removed.
1251 * platform/graphics/surfaces/glx/X11Helper.cpp: Renamed from Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.cpp.
1253 (WebCore::DisplayConnection::DisplayConnection):
1254 (DisplayConnection):
1255 (WebCore::DisplayConnection::~DisplayConnection):
1256 (WebCore::DisplayConnection::display):
1257 (OffScreenRootWindow):
1258 (WebCore::OffScreenRootWindow::OffScreenRootWindow):
1259 (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
1260 (WebCore::OffScreenRootWindow::rootWindow):
1261 (WebCore::X11Helper::resizeWindow):
1262 (WebCore::X11Helper::createOffScreenWindow):
1263 (WebCore::X11Helper::destroyWindow):
1264 (WebCore::X11Helper::isXRenderExtensionSupported):
1265 (WebCore::X11Helper::nativeDisplay):
1266 (WebCore::X11Helper::offscreenRootWindow):
1267 * platform/graphics/surfaces/glx/X11Helper.h: Added.
1269 (WebCore::handleXPixmapCreationError):
1271 (ScopedXPixmapCreationErrorHandler):
1272 (WebCore::ScopedXPixmapCreationErrorHandler::ScopedXPixmapCreationErrorHandler):
1273 (WebCore::ScopedXPixmapCreationErrorHandler::~ScopedXPixmapCreationErrorHandler):
1274 (WebCore::ScopedXPixmapCreationErrorHandler::isValidOperation):
1275 Moved common code from GraphicsSurfaceGLX to X11Helper.
1277 2013-02-09 Andrey Lushnikov <lushnikov@chromium.org>
1279 Web Inspector: show whitespace characters in DTE
1280 https://bugs.webkit.org/show_bug.cgi?id=108947
1282 Reviewed by Pavel Feldman.
1284 New test: inspector/editor/text-editor-show-whitespaces.html
1286 Split consecutive whitespace characters into groups of 16, 8, 4, 2 and 1 and
1287 add ::before pseudoclass for this groups which contains necessary
1288 amount of "dots" (u+00b7). Add a setting "Show whitespace" for this
1289 option in "Sources" section of "General" tab.
1291 * English.lproj/localizedStrings.js:
1292 * inspector/front-end/DefaultTextEditor.js:
1293 (WebInspector.TextEditorMainPanel.prototype.wasShown):
1294 (WebInspector.TextEditorMainPanel.prototype.willHide):
1295 (WebInspector.TextEditorMainPanel.prototype._renderRanges):
1296 (WebInspector.TextEditorMainPanel.prototype._renderWhitespaceCharsWithFixedSizeSpans):
1297 (WebInspector.TextEditorMainPanel.prototype._paintLine):
1298 * inspector/front-end/Settings.js:
1299 * inspector/front-end/SettingsScreen.js:
1300 (WebInspector.GenericSettingsTab):
1301 * inspector/front-end/inspectorSyntaxHighlight.css:
1302 (.webkit-whitespace-1::before):
1303 (.webkit-whitespace-2::before):
1304 (.webkit-whitespace-4::before):
1305 (.webkit-whitespace-8::before):
1306 (.webkit-whitespace-16::before):
1307 (.webkit-whitespace::before):
1309 2013-02-08 Eric Carlson <eric.carlson@apple.com>
1311 [Mac] respect in-band caption color
1312 https://bugs.webkit.org/show_bug.cgi?id=109203
1314 Reviewed by Dean Jackson.
1316 Test: media/track/track-in-band-style.html
1318 * WebCore.xcodeproj/project.pbxproj: Add HTMLDivElement.h to private headers because it is
1319 included by HTMLTextElement, which is included by HTMLMediaElement.h, which is included
1320 by files in WebKit/WebKit2.
1321 * html/track/InbandTextTrack.cpp:
1322 (WebCore::InbandTextTrack::addGenericCue): Set cue colors if necessary.
1324 * html/track/TextTrackCue.h:
1325 (WebCore::TextTrackCue::element): New, accessor for the cue element so it can be styled.
1327 * html/track/TextTrackCueGeneric.cpp:
1328 (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Set container and cue background
1330 (WebCore::TextTrackCueGeneric::operator==): Compare cue colors.
1331 * html/track/TextTrackCueGeneric.h:
1332 (WebCore::TextTrackCueGeneric::foregroundColor): Add color accessors.
1333 (WebCore::TextTrackCueGeneric::setForegroundColor):
1334 (WebCore::TextTrackCueGeneric::backgroundColor):
1335 (WebCore::TextTrackCueGeneric::setBackgroundColor):
1337 * page/CaptionUserPreferencesMac.mm:
1338 (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Always
1339 regenerate override CSS when an element registers for callbacks.
1340 (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Drive by fix of "window color" padding.
1341 (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Log the stylesheet generated
1342 for easier debugging.
1344 * platform/graphics/InbandTextTrackPrivateClient.h:
1345 (WebCore::GenericCueData::foregroundColor): Add color getters/setters.
1346 (WebCore::GenericCueData::setForegroundColor):
1347 (WebCore::GenericCueData::backgroundColor):
1348 (WebCore::GenericCueData::setBackgroundColor):
1350 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1351 (WebCore::makeRGBA32FromARGBCFArray): Initialize a RGBA32 from a CFArray of color values.
1352 (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Process cue colors.
1354 2013-02-08 Benjamin Poulain <bpoulain@apple.com>
1356 Move workerThreadCount from TestRunner to WebCore Internals
1357 https://bugs.webkit.org/show_bug.cgi?id=109239
1359 Reviewed by Darin Adler.
1361 Add the new read-only property workerThreadCount.
1363 * testing/Internals.cpp:
1364 (WebCore::Internals::workerThreadCount):
1366 * testing/Internals.h:
1368 * testing/Internals.idl:
1370 2013-02-08 Dean Jackson <dino@apple.com>
1372 Snapshotted plug-in should use shadow root
1373 https://bugs.webkit.org/show_bug.cgi?id=108284
1375 Reviewed by Simon Fraser.
1377 Take two! This time with updated exports file.
1379 A snapshotted plugin needs to indicate to the user that it can be clicked
1380 to be restarted. Previously this was done with an image that had embedded
1381 text. Instead, we now use an internal shadow root to embed some markup that
1382 will display instructions that can be localised.
1384 The UA stylesheet for plug-ins provides a default styling for the label, which
1385 can be overridden by ports.
1387 In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
1388 since it is only responsible for drawing a paused plug-in. The snapshot creation
1389 can work with the default renderer, but a shadow root requires something like
1390 RenderBlock in order to draw its children. We swap from one renderer to another when
1391 necessary either by creating the shadow root or by explicitly detaching and attaching
1394 Unfortunately this is difficult to test, because the snapshotting requires
1395 time to execute, and also a PluginView to be instantiated.
1397 * WebCore.exp.in: Export the InlineBox interface.
1400 (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
1402 * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
1403 * platform/LocalizedStrings.h:
1404 * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1405 * platform/chromium/LocalizedStringsChromium.cpp:
1406 * platform/efl/LocalizedStringsEfl.cpp:
1407 * platform/gtk/LocalizedStringsGtk.cpp:
1408 * platform/qt/LocalizedStringsQt.cpp:
1410 * html/HTMLPlugInElement.cpp:
1411 (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
1412 that RenderSnapshottedPlugIn no longer is an embedded object.
1414 * html/HTMLPlugInImageElement.cpp:
1415 (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
1416 (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
1417 (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
1418 (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
1419 a renderer, otherwise use the typical plug-in path.
1420 (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
1421 need to give it to the renderer.
1422 (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
1423 * html/HTMLPlugInImageElement.h:
1424 (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
1425 should show immediately.
1426 (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
1427 to swap to the Shadow Root.
1428 (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
1429 in being recreated. Make sure we reattach so that a plugin renderer will be created.
1430 (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
1431 displayState for snapshots.
1432 * html/HTMLPlugInImageElement.h:
1433 (HTMLPlugInImageElement): The new methods listed above.
1434 (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
1435 a snapshot should be immediately labeled.
1437 * page/ChromeClient.h: No need for plugInStartLabelImage any more.
1439 * rendering/RenderSnapshottedPlugIn.cpp:
1440 (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
1441 (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
1442 (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
1443 (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
1444 (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
1445 (WebCore::RenderSnapshottedPlugIn::getCursor):
1446 (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
1447 * rendering/RenderSnapshottedPlugIn.h:
1448 (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
1450 2013-02-08 Dean Jackson <dino@apple.com>
1452 Rolling out r142333 and r142337 which broke Mac Release builds.
1454 2013-02-08 Sheriff Bot <webkit.review.bot@gmail.com>
1456 Unreviewed, rolling out r142337.
1457 http://trac.webkit.org/changeset/142337
1458 https://bugs.webkit.org/show_bug.cgi?id=109339
1460 Breaking Mac release builds (Requested by dino_ on #webkit).
1462 * rendering/RenderSnapshottedPlugIn.h:
1464 2013-02-08 Dean Jackson <dino@apple.com>
1466 Attempted Mac and GTK build fix after r142333.
1468 * rendering/RenderSnapshottedPlugIn.h: Include InlineBox.h.
1470 2013-02-08 Andy Estes <aestes@apple.com>
1472 Restore pre-r118852 behavior for EllipsisBox::nodeAtPoint()
1473 https://bugs.webkit.org/show_bug.cgi?id=109277
1475 Reviewed by Simon Fraser.
1477 Test: fast/flexbox/line-clamp-link-after-ellipsis.html
1479 Roll out r118852. Enough time has passed that this can't be done
1480 mechanically, so transcribe the old method definition to current
1483 * rendering/EllipsisBox.cpp:
1484 (WebCore::EllipsisBox::markupBox): EllipsisBox no longer has
1485 m_markupBox, so break the logic for finding the markup box from
1486 paintMarkupBox() into its own function.
1487 (WebCore::EllipsisBox::paintMarkupBox): Call markupBox().
1488 (WebCore::EllipsisBox::nodeAtPoint): Transcribe the pre-r118852 implementation.
1489 * rendering/EllipsisBox.h:
1490 (EllipsisBox): Declare markupBox().
1492 2013-02-08 Eric Carlson <eric.carlson@apple.com>
1494 [Mac] In-band closed caption tracks are not always initialized correctly
1495 https://bugs.webkit.org/show_bug.cgi?id=109323
1497 Reviewed by Dean Jackson.
1499 No new tests, this fix makes existing tests less flakey.
1501 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1502 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Create and configure legible output
1503 here instad of in tracksChanged.
1504 (WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible): Do nothing in a build with
1505 in-band track support.
1506 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Move legible output creation to
1507 createAVPlayerItem, don't set look at track media type to see if the movie has captions
1508 when we have support for in-band captions.
1510 2013-02-08 Dean Jackson <dino@apple.com>
1512 Snapshotted plug-in should use shadow root
1513 https://bugs.webkit.org/show_bug.cgi?id=108284
1515 Reviewed by Simon Fraser.
1517 A snapshotted plugin needs to indicate to the user that it can be clicked
1518 to be restarted. Previously this was done with an image that had embedded
1519 text. Instead, we now use an internal shadow root to embed some markup that
1520 will display instructions that can be localised.
1522 The UA stylesheet for plug-ins provides a default styling for the label, which
1523 can be overridden by ports.
1525 In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
1526 since it is only responsible for drawing a paused plug-in. The snapshot creation
1527 can work with the default renderer, but a shadow root requires something like
1528 RenderBlock in order to draw its children. We swap from one renderer to another when
1529 necessary either by creating the shadow root or by explicitly detaching and attaching
1532 Unfortunately this is difficult to test, because the snapshotting requires
1533 time to execute, and also a PluginView to be instantiated.
1536 (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
1538 * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
1539 * platform/LocalizedStrings.h:
1540 * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1541 * platform/chromium/LocalizedStringsChromium.cpp:
1542 * platform/efl/LocalizedStringsEfl.cpp:
1543 * platform/gtk/LocalizedStringsGtk.cpp:
1544 * platform/qt/LocalizedStringsQt.cpp:
1546 * html/HTMLPlugInElement.cpp:
1547 (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
1548 that RenderSnapshottedPlugIn no longer is an embedded object.
1550 * html/HTMLPlugInImageElement.cpp:
1551 (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
1552 (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
1553 (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
1554 (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
1555 a renderer, otherwise use the typical plug-in path.
1556 (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
1557 need to give it to the renderer.
1558 (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
1559 * html/HTMLPlugInImageElement.h:
1560 (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
1561 should show immediately.
1562 (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
1563 to swap to the Shadow Root.
1564 (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
1565 in being recreated. Make sure we reattach so that a plugin renderer will be created.
1566 (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
1567 displayState for snapshots.
1568 * html/HTMLPlugInImageElement.h:
1569 (HTMLPlugInImageElement): The new methods listed above.
1570 (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
1571 a snapshot should be immediately labeled.
1573 * page/ChromeClient.h: No need for plugInStartLabelImage any more.
1575 * rendering/RenderSnapshottedPlugIn.cpp:
1576 (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
1577 (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
1578 (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
1579 (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
1580 (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
1581 (WebCore::RenderSnapshottedPlugIn::getCursor):
1582 (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
1583 * rendering/RenderSnapshottedPlugIn.h:
1584 (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
1586 2013-02-08 Kentaro Hara <haraken@chromium.org>
1588 {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator should be in FocusEvent.cpp
1589 https://bugs.webkit.org/show_bug.cgi?id=109265
1591 Reviewed by Dimitri Glazkov.
1593 Conventionally we put XXXEventDispatchMediator to XXXEvent.cpp.
1594 We should move {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator to FocusEvent.cpp.
1596 No tests. No change in behavior.
1598 * dom/EventDispatchMediator.cpp:
1599 * dom/EventDispatchMediator.h:
1600 * dom/FocusEvent.cpp:
1601 (WebCore::FocusEventDispatchMediator::create):
1603 (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
1604 (WebCore::FocusEventDispatchMediator::dispatchEvent):
1605 (WebCore::BlurEventDispatchMediator::create):
1606 (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
1607 (WebCore::BlurEventDispatchMediator::dispatchEvent):
1608 (WebCore::FocusInEventDispatchMediator::create):
1609 (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
1610 (WebCore::FocusInEventDispatchMediator::dispatchEvent):
1611 (WebCore::FocusOutEventDispatchMediator::create):
1612 (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
1613 (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
1616 (FocusEventDispatchMediator):
1617 (BlurEventDispatchMediator):
1618 (FocusInEventDispatchMediator):
1619 (FocusOutEventDispatchMediator):
1623 2013-02-08 Jer Noble <jer.noble@apple.com>
1625 Unreviewed build fix. MSVC (and other compilers) need a default: case in switch statement.
1627 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1628 (WebCore::notificationName):
1630 2013-02-08 Jer Noble <jer.noble@apple.com>
1632 Bring WebKit up to speed with latest Encrypted Media spec.
1633 https://bugs.webkit.org/show_bug.cgi?id=97037
1635 Reviewed by Eric Carlson.
1637 The most recent version of the Encrypted Media Extensions spec breaks functionality out of the
1638 HTMLMediaElement and into new MediaKeys and MediaKeySession classes. Since the CDM functionality
1639 has been pulled out of the media element, we create a proxy CDM class and factory system for
1640 creating specific CDM key system implementations. The spec also breaks out MediaKeyEvent
1641 into distinct event classes, MediaKeyNeededEvent and MediaKeyMessageEvent, for needkey and
1642 keymessage events, respectively.
1644 Tests: media/encrypted-media/encrypted-media-v2-events.html
1645 media/encrypted-media/encrypted-media-v2-syntax.html
1647 CDM is a proxy class (a la MediaPlayer) for a specific CDMPrivateInterface implementation. A CDM
1648 implementation is registered with the CDMFactory and will be created if that implementation supports
1649 the key system passed into the MediaKeys constructor. CDMSession is a pure-virtual interface exposed
1650 by concrete CDMPrivate subclasses. Its lifetime is owned by MediaKeySession.
1651 * Modules/encryptedmedia/CDM.cpp: Added.
1652 (WebCore::installedCDMFactories): Initialize all the known CDM subtypes. Ports will add CDM implementations here.
1653 (WebCore::CDM::registerCDMFactory): Registers a new CDMFactory using the passed in function pointers.
1654 (WebCore::CDMFactoryForKeySystem): Return the first CDM factory which supports the requested key system.
1655 (WebCore::CDM::supportsKeySystem): Walk the installed CDMs and ask if the given key system is supported.
1656 (WebCore::CDM::supportsKeySystemMIMETypeAndCodec): Ditto, with an additional MIME type and codec string.
1657 (WebCore::CDM::create): Simple constructor wrapper.
1658 (WebCore::CDM::CDM): Simple constructor; calls bestCDMForKeySystem() to create it's private implementation.
1659 (WebCore::CDM::~CDM): Simple destructor.
1660 (WebCore::CDM::createSession): Creates a new CDMSession.
1661 * Modules/encryptedmedia/CDM.h: Added.
1662 (WebCore::CDM::keySystem): Simple accessor for m_keySystem.
1663 (WebCore::CDMSession::CDMSession): Simple constructor.
1664 (WebCore::CDMSession::~CDMSession): Simple destructor.
1665 * Modules/encryptedmedia/CDMPrivate.h: Added.
1666 (WebCore::CDMPrivateInterface::CDMPrivateInterface): Simple constructor.
1667 (WebCore::CDMPrivateInterface::~CDMPrivateInterface): Simple destructor.
1669 The new classes, MediaKeyMessageEvent and MediaKeyNeededEvent, take distinct subsets of the initializers of
1670 the original MediaKeyMessageEvent.
1671 * Modules/encryptedmedia/MediaKeyMessageEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.cpp.
1672 (WebCore::MediaKeyMessageEventInit::MediaKeyMessageEventInit): Initializer now only takes message and destinationURL
1674 (WebCore::MediaKeyMessageEvent::MediaKeyMessageEvent): Simple constructor.
1675 (WebCore::MediaKeyMessageEvent::~MediaKeyMessageEvent): Simple destructor.
1676 (WebCore::MediaKeyMessageEvent::interfaceName): Standard interfaceName.
1677 * Modules/encryptedmedia/MediaKeyMessageEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
1678 (WebCore::MediaKeyMessageEvent::create): Simple construction wrapper.
1679 (WebCore::MediaKeyMessageEvent::message): Simple accessor for m_message.
1680 (WebCore::MediaKeyMessageEvent::destinationURL): Simple accessor for m_destinationURL.
1681 * Modules/encryptedmedia/MediaKeyMessageEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.
1682 * Modules/encryptedmedia/MediaKeyNeededEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.h.
1683 (WebCore::MediaKeyNeededEventInit::MediaKeyNeededEventInit): Initializer now only takes initData parameter.
1684 (WebCore::MediaKeyNeededEvent::MediaKeyNeededEvent): Simple constructor.
1685 (WebCore::MediaKeyNeededEvent::~MediaKeyNeededEvent): Simple destructor.
1686 (WebCore::MediaKeyNeededEvent::interfaceName): Standard interfaceName.
1687 * Modules/encryptedmedia/MediaKeyNeededEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
1688 (WebCore::MediaKeyNeededEvent::create): Simple construction wrapper.
1689 (WebCore::MediaKeyNeededEvent::initData): Simple accessor for m_initData.
1690 * Modules/encryptedmedia/MediaKeyNeededEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.
1692 MediaKeySession is a new class that maps keys and key requests to a given session ID:
1693 * Modules/encryptedmedia/MediaKeySession.cpp: Added.
1694 (WebCore::MediaKeySession::create): Simple construction wrapper.
1695 (WebCore::MediaKeySession::MediaKeySession): Simple constructor.
1696 (WebCore::MediaKeySession::~MediaKeySession): Simple destructor; calls close().
1697 (WebCore::MediaKeySession::setError): Simple setter for m_error;
1698 (WebCore::MediaKeySession::close): Tell the CDM to clear any saved session keys.
1699 (WebCore::MediaKeySession::generateKeyRequest): Start a one-shot timer, handled in keyRequestTimerFired.
1700 (WebCore::MediaKeySession::keyRequestTimerFired): Follow the steps in the spec; ask the CDM to generate a key request.
1701 (WebCore::MediaKeySession::addKey): Start a one-shot timer, handled in addKeyTimerFired.
1702 (WebCore::MediaKeySession::addKeyTimerFired): Follow the steps in the spec; provide the key data to the CDM.
1703 * Modules/encryptedmedia/MediaKeySession.h: Added.
1704 (WebCore::MediaKeySession::keySystem): Simple accessor for m_keySystem.
1705 (WebCore::MediaKeySession::sessionId): Simple accessor for m_sessionId.
1706 (WebCore::MediaKeySession::error): Simple accessor for m_error;
1707 * Modules/encryptedmedia/MediaKeySession.idl:
1709 MediaKeySession inherits from EventTarget, and must override the pure virtual functions in that class:
1710 * Modules/encryptedmedia/MediaKeySession.cpp: Added.
1711 (WebCore::MediaKeySession::interfaceName):
1712 * Modules/encryptedmedia/MediaKeySession.h: Added.
1713 (WebCore::MediaKeySession::refEventTarget):
1714 (WebCore::MediaKeySession::derefEventTarget):
1715 (WebCore::MediaKeySession::eventTargetData):
1716 (WebCore::MediaKeySession::ensureEventTargetData):
1717 (WebCore::MediaKeySession::scriptExecutionContext):
1719 MediaKeys is a new class that encapsulates a CDM and a number of key sessions:
1720 * Modules/encryptedmedia/MediaKeys.cpp: Added.
1721 (WebCore::MediaKeys::create): Throw an exception if the key system parameter is unsupported; create a CDM object
1722 and a new MediaKeys session.
1723 (WebCore::MediaKeys::MediaKeys): Simple constructor.
1724 (WebCore::MediaKeys::~MediaKeys): Simple destructor.
1725 (WebCore::MediaKeys::createSession): Follow the spec and create a new key session.
1726 * Modules/encryptedmedia/MediaKeys.h: Added.
1727 * Modules/encryptedmedia/MediaKeys.idl: Copied from Source/WebCore/html/MediaError.idl.
1729 Provide a new interface to HTMLMediaElement for MediaPlayer which does not require a sessionId or a key system:
1730 * html/HTMLMediaElement.cpp:
1731 (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
1732 * platform/graphics/MediaPlayer.cpp:
1733 (WebCore::MediaPlayer::keyNeeded):
1735 MediaKeyError now has a systemCode parameter and member variable.
1736 * html/MediaKeyError.h:
1737 (WebCore::MediaKeyError::create): Take a systemCode parameter with a default (0) value.
1738 (WebCore::MediaKeyError::MediaKeyError): Ditto.
1739 (WebCore::MediaKeyError::systemCode): Simple accessor for m_systemCode.
1740 * html/MediaKeyError.idl:
1742 Add new methods to HTMLMediaElement to support MediaKeys. Support different initializer
1743 for the MediaKeyNeededEvent.
1744 * html/HTMLMediaElement.cpp:
1745 (WebCore::HTMLMediaElement::setMediaKeys): Simple setter for m_mediaKeys.
1746 (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): This version takes fewer parameters
1747 than the deprecated version.
1748 * html/HTMLMediaElement.h:
1749 (WebCore::HTMLMediaElement::mediaKeys): Simple accessor for m_mediaKeys.
1750 * html/HTMLMediaElement.idl: Add the mediaKeys attribute.
1752 Add an ENABLE(ENCRYPTED_MEDIA_V2) check to the existing ENABLE(ENCRYPTED_MEDIA) one:
1753 * html/MediaError.h:
1754 * html/MediaError.idl:
1755 * platform/graphics/MediaPlayer.cpp:
1756 (WebCore::bestMediaEngineForTypeAndCodecs):
1757 (WebCore::MediaPlayer::supportsType):
1758 * platform/graphics/MediaPlayer.h:
1759 (WebCore::MediaPlayer::keyNeeded): This version takes fewer parameters than the
1762 Support the new version of canPlayType which takes an extra parameter:
1763 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1764 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1765 (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
1766 (WebCore::MediaPlayerPrivateAVFoundationObjC::extendedSupportsType):
1767 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1768 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1769 (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
1770 (WebCore::MediaPlayerPrivateQTKit::extendedSupportsType):
1772 Add a mock CDM for use within DRT and WKTR to test the MediaKeys and MediaKeySession
1774 * testing/Internals.cpp:
1775 (WebCore::Internals::initializeMockCDM): Add the MockCDM class to the CDM factories.
1776 * testing/Internals.h:
1777 * testing/Internals.idl: Add the initializeMockCDM() method.
1778 * testing/MockCDM.cpp: Added.
1779 (WebCore::MockCDM::supportsKeySystem): Only supports the 'com.webcore.mock' key system.
1780 (WebCore::MockCDM::supportsMIMEType): Only supports the 'video/mock' mime type.
1781 (WebCore::initDataPrefix): Static method which returns a Uint8Array containing 'mock'.
1782 (WebCore::keyPrefix): Static method which returns a Uint8Array containing 'key'.
1783 (WebCore::keyRequest): Static method which returns a Uint8Array containing 'request'.
1784 (WebCore::generateSessionId): Return a monotonically increasing number.
1785 (WebCore::MockCDMSession::MockCDMSession): Simple constructor.
1786 (WebCore::MockCDMSession::generateKeyRequest): Ignores the parameters and returns a keyRequest() array.
1787 (WebCore::MockCDMSession::releaseKeys): No-op.
1788 (WebCore::MockCDMSession::addKey): Checks that the key starts with the keyPrefix() array.
1789 * testing/MockCDM.h: Added.
1790 (WebCore::MockCDM::create):
1791 (WebCore::MockCDM::~MockCDM): Simple destructor.
1792 (WebCore::MockCDM::MockCDM): Simple constructor.
1794 Add the new classes to the built system:
1795 * Configurations/FeatureDefines.xcconfig:
1796 * DerivedSources.make:
1798 * WebCore.xcodeproj/project.pbxproj:
1800 Miscelaneous changes:
1801 * dom/EventNames.in: Add the two new event types, MediaKeyMessageEvent and MediaKeyNeededEvent.
1802 * dom/EventTargetFactory.in: Add the new EventTarget, MediaKeySession.
1803 * page/DOMWindow.idl: Add constructors for the new classes to the window object.
1805 2013-02-08 Chris Fleizach <cfleizach@apple.com>
1807 Refactor platform-specific code in SpeechSynthesis
1808 https://bugs.webkit.org/show_bug.cgi?id=107414
1810 Reviewed by Sam Weinig.
1812 Refactor WebSpeech code to use a platform mechanism to provide access to platform resources.
1814 * Modules/speech/DOMWindowSpeechSynthesis.cpp:
1815 (WebCore::DOMWindowSpeechSynthesis::from):
1816 * Modules/speech/SpeechSynthesis.cpp:
1817 (WebCore::SpeechSynthesis::SpeechSynthesis):
1819 (WebCore::SpeechSynthesis::voicesDidChange):
1820 (WebCore::SpeechSynthesis::getVoices):
1821 (WebCore::SpeechSynthesis::pending):
1822 (WebCore::SpeechSynthesis::speaking):
1823 (WebCore::SpeechSynthesis::paused):
1824 (WebCore::SpeechSynthesis::speak):
1825 (WebCore::SpeechSynthesis::cancel):
1826 (WebCore::SpeechSynthesis::pause):
1827 (WebCore::SpeechSynthesis::resume):
1828 * Modules/speech/SpeechSynthesis.h:
1831 (WebCore::SpeechSynthesis::didStartSpeaking):
1832 (WebCore::SpeechSynthesis::didFinishSpeaking):
1833 (WebCore::SpeechSynthesis::speakingErrorOccurred):
1834 * Modules/speech/SpeechSynthesisUtterance.cpp:
1835 (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
1836 * Modules/speech/SpeechSynthesisUtterance.h:
1837 (WebCore::SpeechSynthesisUtterance::text):
1838 (WebCore::SpeechSynthesisUtterance::setText):
1839 (WebCore::SpeechSynthesisUtterance::lang):
1840 (WebCore::SpeechSynthesisUtterance::setLang):
1841 (WebCore::SpeechSynthesisUtterance::voiceURI):
1842 (WebCore::SpeechSynthesisUtterance::setVoiceURI):
1843 (WebCore::SpeechSynthesisUtterance::volume):
1844 (WebCore::SpeechSynthesisUtterance::setVolume):
1845 (WebCore::SpeechSynthesisUtterance::rate):
1846 (WebCore::SpeechSynthesisUtterance::setRate):
1847 (WebCore::SpeechSynthesisUtterance::pitch):
1848 (WebCore::SpeechSynthesisUtterance::setPitch):
1849 (SpeechSynthesisUtterance):
1850 (WebCore::SpeechSynthesisUtterance::platformUtterance):
1851 * Modules/speech/SpeechSynthesisVoice.cpp:
1852 (WebCore::SpeechSynthesisVoice::create):
1853 (WebCore::SpeechSynthesisVoice::SpeechSynthesisVoice):
1854 * Modules/speech/SpeechSynthesisVoice.h:
1855 (SpeechSynthesisVoice):
1856 (WebCore::SpeechSynthesisVoice::voiceURI):
1857 (WebCore::SpeechSynthesisVoice::name):
1858 (WebCore::SpeechSynthesisVoice::lang):
1859 (WebCore::SpeechSynthesisVoice::localService):
1860 (WebCore::SpeechSynthesisVoice::isDefault):
1861 * Modules/speech/mac/SpeechSynthesisMac.mm:
1862 * WebCore.xcodeproj/project.pbxproj:
1863 * platform/PlatformSpeechSynthesis.h: Added.
1865 (PlatformSpeechSynthesis):
1866 * platform/PlatformSpeechSynthesisUtterance.cpp: Added.
1868 (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
1869 * platform/PlatformSpeechSynthesisUtterance.h: Added.
1871 (PlatformSpeechSynthesisUtteranceClient):
1872 (WebCore::PlatformSpeechSynthesisUtteranceClient::~PlatformSpeechSynthesisUtteranceClient):
1873 (PlatformSpeechSynthesisUtterance):
1874 (WebCore::PlatformSpeechSynthesisUtterance::text):
1875 (WebCore::PlatformSpeechSynthesisUtterance::setText):
1876 (WebCore::PlatformSpeechSynthesisUtterance::lang):
1877 (WebCore::PlatformSpeechSynthesisUtterance::setLang):
1878 (WebCore::PlatformSpeechSynthesisUtterance::voiceURI):
1879 (WebCore::PlatformSpeechSynthesisUtterance::setVoiceURI):
1880 (WebCore::PlatformSpeechSynthesisUtterance::volume):
1881 (WebCore::PlatformSpeechSynthesisUtterance::setVolume):
1882 (WebCore::PlatformSpeechSynthesisUtterance::rate):
1883 (WebCore::PlatformSpeechSynthesisUtterance::setRate):
1884 (WebCore::PlatformSpeechSynthesisUtterance::pitch):
1885 (WebCore::PlatformSpeechSynthesisUtterance::setPitch):
1886 * platform/PlatformSpeechSynthesisVoice.cpp: Added.
1888 (WebCore::PlatformSpeechSynthesisVoice::create):
1889 (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
1890 * platform/PlatformSpeechSynthesisVoice.h: Added.
1892 (PlatformSpeechSynthesisVoice):
1893 (WebCore::PlatformSpeechSynthesisVoice::voiceURI):
1894 (WebCore::PlatformSpeechSynthesisVoice::name):
1895 (WebCore::PlatformSpeechSynthesisVoice::lang):
1896 (WebCore::PlatformSpeechSynthesisVoice::localService):
1897 (WebCore::PlatformSpeechSynthesisVoice::isDefault):
1898 * platform/PlatformSpeechSynthesizer.cpp: Added.
1900 (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
1901 * platform/PlatformSpeechSynthesizer.h: Added.
1903 (PlatformSpeechSynthesizerClient):
1904 (WebCore::PlatformSpeechSynthesizerClient::~PlatformSpeechSynthesizerClient):
1905 (PlatformSpeechSynthesizer):
1906 (WebCore::PlatformSpeechSynthesizer::voiceList):
1907 * platform/mac/PlatformSpeechSynthesisMac.mm: Added.
1909 (WebCore::PlatformSpeechSynthesis::create):
1910 (WebCore::PlatformSpeechSynthesis::PlatformSpeechSynthesis):
1911 (WebCore::PlatformSpeechSynthesis::platformSpeak):
1912 * platform/mac/PlatformSpeechSynthesizerMac.mm: Added.
1914 (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
1915 (WebCore::PlatformSpeechSynthesizer::speak):
1917 2013-02-08 Dean Jackson <dino@apple.com>
1919 Put snapshotting label text into localizable strings
1920 https://bugs.webkit.org/show_bug.cgi?id=108268
1922 Reviewed by Simon Fraser.
1924 In preparation for a snapshotted plug-in using a ShadowRoot, allow
1925 its label to be localized.
1927 * English.lproj/Localizable.strings:
1928 * platform/LocalizedStrings.cpp:
1929 (WebCore::snapshottedPlugInLabelTitle): New method for returning title.
1930 (WebCore::snapshottedPlugInLabelSubtitle): New method for returning subtitle.
1931 * platform/LocalizedStrings.h:
1933 2013-02-08 Dean Jackson <dino@apple.com>
1935 Do not register autostart for plugins from file:// (or nowhere)
1936 https://bugs.webkit.org/show_bug.cgi?id=108271
1938 Reviewed by Tim Horton.
1940 If the page url origin is treated as a local URL, don't attempt
1941 to add it to the auto-start list.
1943 * html/HTMLPlugInImageElement.cpp:
1944 (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
1946 2013-02-08 Adam Barth <abarth@webkit.org>
1948 Use WeakPtrs to communicate between the HTMLDocumentParser and the BackgroundHTMLParser
1949 https://bugs.webkit.org/show_bug.cgi?id=107190
1951 Reviewed by Eric Seidel.
1953 This patch replaces the parser map with WeakPtr. We now use WeakPtrs to
1954 communicate from the main thread to the background thread. (We were
1955 already using WeakPtrs to communicate from the background thread to the
1956 main thread.) This change lets us remove a bunch of boilerplate code.
1958 * html/parser/BackgroundHTMLParser.cpp:
1959 (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
1960 (WebCore::BackgroundHTMLParser::stop):
1962 * html/parser/BackgroundHTMLParser.h:
1963 (WebCore::BackgroundHTMLParser::create):
1964 (BackgroundHTMLParser):
1965 * html/parser/HTMLDocumentParser.cpp:
1966 (WebCore::HTMLDocumentParser::didFailSpeculation):
1967 (WebCore::HTMLDocumentParser::startBackgroundParser):
1968 (WebCore::HTMLDocumentParser::stopBackgroundParser):
1969 (WebCore::HTMLDocumentParser::append):
1970 (WebCore::HTMLDocumentParser::finish):
1971 * html/parser/HTMLDocumentParser.h:
1973 (HTMLDocumentParser):
1975 2013-02-07 Roger Fong <roger_fong@apple.com>
1977 VS2010 WebCore TestSupport project.
1978 https://bugs.webkit.org/show_bug.cgi?id=107034.
1980 Reviewed by Brent Fulgham.
1982 * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Added.
1983 * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Added.
1985 2013-02-08 ChangSeok Oh <shivamidow@gmail.com>
1987 [GTK][AC] GraphicsLayerActor code clean up after clutter version up.
1988 https://bugs.webkit.org/show_bug.cgi?id=109304
1990 Reviewed by Gustavo Noronha Silva.
1992 This patch cleans up GraphicsLayerActor functions by using new clutter apis
1993 and makes existing functions simple & readable.
1995 No new tests since no change in functionality
1997 * platform/graphics/clutter/GraphicsLayerActor.cpp:
1998 (_GraphicsLayerActorPrivate):
1999 (graphicsLayerActorApplyTransform):
2000 (graphicsLayerActorPaint):
2001 (graphicsLayerActorDraw):
2002 (graphicsLayerActorUpdateTexture):
2003 (drawLayerContents):
2004 (graphicsLayerActorNew):
2005 (graphicsLayerActorInvalidateRectangle):
2006 (graphicsLayerActorSetTransform):
2007 (graphicsLayerActorSetAnchorPoint):
2008 (graphicsLayerActorGetAnchorPoint):
2009 (graphicsLayerActorSetScrollPosition):
2010 * platform/graphics/clutter/PlatformClutterAnimation.h:
2012 2013-02-08 Harald Alvestrand <hta@google.com>
2014 Fix and test for missing return statement
2016 RTCPeerConnection.getStats() failed when remote stats were instantiated.
2017 https://bugs.webkit.org/show_bug.cgi?id=109292
2019 Reviewed by Adam Barth.
2021 Tested by extending the existing mock's behaviour.
2023 * Modules/mediastream/RTCStatsReport.cpp:
2024 (WebCore::RTCStatsReport::addElement):
2026 2013-02-08 Anton Vayvod <avayvod@chromium.org>
2028 [Text Autosizing] Split isAutosizingCluster into three independent checks
2029 https://bugs.webkit.org/show_bug.cgi?id=109093
2031 Refactoring to create more flexible version of isAutosizingCluster since there're more types
2032 of autosizing cluster now: narrower than the parent cluster, wider than the parent cluster
2033 and the one that doesn't depend on the parent cluster.
2035 Reviewed by Kenneth Rohde Christiansen.
2037 Refactoring, no test changes.
2039 * rendering/TextAutosizer.cpp:
2041 (WebCore::TextAutosizer::isNarrowDescendant):
2043 Separate check for the container to be of the narrow-descendant type. Was a part of
2044 isAutosizingCluster().
2046 (WebCore::TextAutosizer::isWiderDescendant):
2048 Separate check for the container to be of the wider-descendant type. Was a part of
2049 isAutosizingCluster().
2051 (WebCore::TextAutosizer::isIndependentDescendant):
2053 Separate check for the container to be autosized separately from the ancestor cluster.
2054 Checks for conditions independent of the aforementioned cluster.
2056 (WebCore::TextAutosizer::isAutosizingCluster):
2058 Handy method to check all separate conditions together.
2060 (WebCore::TextAutosizer::processSubtree):
2061 (WebCore::TextAutosizer::processCluster):
2062 (WebCore::TextAutosizer::processContainer):
2063 (WebCore::TextAutosizer::clusterShouldBeAutosized):
2064 (WebCore::TextAutosizer::measureDescendantTextWidth):
2065 (WebCore::TextAutosizer::findFirstTextLeafNotInCluster):
2067 The methods above were updated to use new functions/arguments.
2069 * rendering/TextAutosizer.h:
2071 Updated/added method definitions.
2073 2013-02-08 Vsevolod Vlasov <vsevik@chromium.org>
2075 Web Inspector: Extension sever should use Workspace.projectForType() instead of Workspace.project()
2076 https://bugs.webkit.org/show_bug.cgi?id=109301
2078 Reviewed by Alexander Pavlov.
2080 * inspector/front-end/ExtensionServer.js:
2081 (WebInspector.ExtensionServer.prototype._onGetPageResources):
2083 2013-02-04 Yury Semikhatsky <yurys@chromium.org>
2085 Web Inspector: simplify Memory.getDOMNodeCount implementation
2086 https://bugs.webkit.org/show_bug.cgi?id=108821
2088 Reviewed by Alexander Pavlov.
2090 Removed Memory.getDOMNodeCount command from the protocol. Memory.getDOMCounters
2091 should be used instead.
2093 * inspector/Inspector.json:
2094 * inspector/InspectorMemoryAgent.cpp:
2095 * inspector/InspectorMemoryAgent.h:
2096 (InspectorMemoryAgent):
2098 2013-02-08 Yury Semikhatsky <yurys@chromium.org>
2100 Web Inspector: refactor MemoryStatistics.js
2101 https://bugs.webkit.org/show_bug.cgi?id=109299
2103 Reviewed by Vsevolod Vlasov.
2105 Extracted functionality specific to DOM counter graphs drawing into
2106 separate methods on MemoryStatistics class.
2107 Introduced CounterUIBase base class for DOMCounterUI that contains
2108 functionality which can be shared with native memory graph.
2110 * inspector/front-end/MemoryStatistics.js:
2111 (WebInspector.MemoryStatistics):
2112 (WebInspector.CounterUIBase):
2113 (WebInspector.CounterUIBase.prototype.updateCurrentValue):
2114 (WebInspector.CounterUIBase.prototype.clearCurrentValueAndMarker):
2115 (WebInspector.CounterUIBase.prototype.get visible):
2116 (WebInspector.DOMCounterUI):
2117 (WebInspector.DOMCounterUI.prototype.discardImageUnderMarker):
2118 (WebInspector.MemoryStatistics.prototype._onMouseOut):
2119 (WebInspector.MemoryStatistics.prototype._clearCurrentValueAndMarker):
2120 (WebInspector.MemoryStatistics.prototype._refreshCurrentValues):
2121 (WebInspector.MemoryStatistics.prototype._updateCurrentValue):
2122 (WebInspector.MemoryStatistics.prototype._highlightCurrentPositionOnGraphs):
2123 (WebInspector.MemoryStatistics.prototype._restoreImageUnderMarker):
2124 (WebInspector.MemoryStatistics.prototype._saveImageUnderMarker):
2125 (WebInspector.MemoryStatistics.prototype._drawMarker):
2126 (WebInspector.MemoryStatistics.prototype._clear):
2127 (WebInspector.MemoryStatistics.prototype._discardImageUnderMarker):
2129 2013-02-08 Mike West <mkwst@chromium.org>
2131 Add a new IGNORE_EXCEPTION helper to ignore ExceptionCodes when they are expected but uninteresting
2132 https://bugs.webkit.org/show_bug.cgi?id=108771
2134 Reviewed by Eric Seidel.
2136 In cases where the ExceptionCode passed into a function is completely
2137 ignored, this patch replaces it with a new IGNORE_EXCEPTION macro. This
2138 makes our expectations about possible exceptions (or lack thereof)
2139 explicit, rather than relying on implicit assumptions about whether a
2140 variable is intentionally uninitialized or not. It also removes
2141 knowledge about the internals of ExceptionCodes (that they're currently
2142 ints, for instance) from code that shouldn't care, which will help with
2143 future refactorings.
2145 The implementation is entirely based upon ASSERT_NO_EXCEPTION, and
2146 shouldn't have any visible effect on the web. As long as all the
2147 current tests pass, we're good.
2149 * Modules/indexeddb/IDBRequest.cpp:
2150 (WebCore::IDBRequest::dispatchEvent):
2151 (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
2152 * Modules/indexeddb/IDBTransaction.cpp:
2153 (WebCore::IDBTransaction::stop):
2154 * Modules/websockets/WebSocketChannel.cpp:
2155 (WebCore::WebSocketChannel::processBuffer):
2157 (WebCore::Document::processHttpEquiv):
2158 * dom/ExceptionCodePlaceholder.h:
2161 (WebCore::Node::normalize):
2163 (WebCore::Text::replaceWholeText):
2164 * editing/AlternativeTextController.cpp:
2165 (WebCore::AlternativeTextController::insertDictatedText):
2166 * editing/AppendNodeCommand.cpp:
2167 (WebCore::AppendNodeCommand::doApply):
2168 (WebCore::AppendNodeCommand::doUnapply):
2169 * editing/CompositeEditCommand.cpp:
2170 (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt):
2171 * editing/DeleteFromTextNodeCommand.cpp:
2172 (WebCore::DeleteFromTextNodeCommand::doUnapply):
2173 * editing/Editor.cpp:
2174 (WebCore::dispatchEditableContentChangedEvents):
2175 (WebCore::Editor::applyEditingStyleToElement):
2176 * editing/EditorCommand.cpp:
2177 (WebCore::executeFormatBlock):
2178 * editing/FormatBlockCommand.cpp:
2179 (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
2180 * editing/InsertIntoTextNodeCommand.cpp:
2181 (WebCore::InsertIntoTextNodeCommand::doApply):
2182 (WebCore::InsertIntoTextNodeCommand::doUnapply):
2183 * editing/InsertListCommand.cpp:
2184 (WebCore::InsertListCommand::doApplyForSingleParagraph):
2185 * editing/InsertNodeBeforeCommand.cpp:
2186 (WebCore::InsertNodeBeforeCommand::doApply):
2187 (WebCore::InsertNodeBeforeCommand::doUnapply):
2188 * editing/RemoveCSSPropertyCommand.cpp:
2189 (WebCore::RemoveCSSPropertyCommand::doApply):
2190 (WebCore::RemoveCSSPropertyCommand::doUnapply):
2191 * editing/RemoveNodeCommand.cpp:
2192 (WebCore::RemoveNodeCommand::doApply):
2193 (WebCore::RemoveNodeCommand::doUnapply):
2194 * editing/ReplaceSelectionCommand.cpp:
2195 (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
2196 * editing/TextIterator.cpp:
2197 (WebCore::TextIterator::getLocationAndLengthFromRange):
2198 * editing/WrapContentsInDummySpanCommand.cpp:
2199 (WebCore::WrapContentsInDummySpanCommand::executeApply):
2200 (WebCore::WrapContentsInDummySpanCommand::doUnapply):
2201 * editing/htmlediting.cpp:
2202 (WebCore::comparePositions):
2203 * editing/markup.cpp:
2204 (WebCore::highestAncestorToWrapMarkup):
2205 * html/FTPDirectoryDocument.cpp:
2206 (WebCore::FTPDirectoryDocumentParser::appendEntry):
2207 (WebCore::FTPDirectoryDocumentParser::createTDForFilename):
2208 (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
2209 (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
2210 * html/HTMLMediaElement.cpp:
2211 (WebCore::HTMLMediaElement::rewind):
2212 (WebCore::HTMLMediaElement::returnToRealtime):
2213 (WebCore::HTMLMediaElement::playInternal):
2214 (WebCore::HTMLMediaElement::percentLoaded):
2215 (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2216 (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
2217 (WebCore::HTMLMediaElement::applyMediaFragmentURI):
2218 * html/HTMLOutputElement.cpp:
2219 (WebCore::HTMLOutputElement::setTextContentInternal):
2220 * html/HTMLSelectElement.cpp:
2221 (WebCore::HTMLSelectElement::remove):
2222 * html/HTMLTableElement.cpp:
2223 (WebCore::HTMLTableElement::createTHead):
2224 (WebCore::HTMLTableElement::deleteTHead):
2225 (WebCore::HTMLTableElement::createTFoot):
2226 (WebCore::HTMLTableElement::deleteTFoot):
2227 (WebCore::HTMLTableElement::createCaption):
2228 (WebCore::HTMLTableElement::deleteCaption):
2229 * html/HTMLTextAreaElement.cpp:
2230 (WebCore::HTMLTextAreaElement::setDefaultValue):
2231 * html/ImageDocument.cpp:
2232 (WebCore::ImageDocument::createDocumentStructure):
2233 * html/InputType.cpp:
2234 (WebCore::InputType::stepUpFromRenderer):
2235 * html/MediaController.cpp:
2236 (MediaController::bringElementUpToSpeed):
2237 (MediaController::asyncEventTimerFired):
2238 * html/MediaDocument.cpp:
2239 (WebCore::MediaDocumentParser::createDocumentStructure):
2240 (WebCore::MediaDocument::replaceMediaElementTimerFired):
2241 * html/PluginDocument.cpp:
2242 (WebCore::PluginDocumentParser::createDocumentStructure):
2243 * html/RangeInputType.cpp:
2244 (WebCore::RangeInputType::handleKeydownEvent):
2245 * html/TimeRanges.cpp:
2246 (TimeRanges::contain):
2247 (TimeRanges::nearest):
2248 * html/canvas/CanvasRenderingContext2D.cpp:
2249 (WebCore::CanvasRenderingContext2D::drawImageFromRect):
2250 * html/shadow/MediaControlElementTypes.cpp:
2251 (WebCore::MediaControlSeekButtonElement::seekTimerFired):
2252 * html/shadow/MediaControlElements.cpp:
2253 (WebCore::MediaControlPanelElement::setPosition):
2254 (WebCore::MediaControlPanelElement::resetPosition):
2255 (WebCore::MediaControlStatusDisplayElement::update):
2256 (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
2257 (WebCore::MediaControlTimelineElement::defaultEventHandler):
2258 * html/shadow/MediaControls.cpp:
2259 (WebCore::MediaControls::updateCurrentTimeDisplay):
2260 (WebCore::MediaControls::createTextTrackDisplay):
2261 * html/shadow/MediaControlsApple.cpp:
2262 (WebCore::MediaControlsApple::updateCurrentTimeDisplay):
2263 * html/shadow/MediaControlsBlackBerry.cpp:
2264 (WebCore::MediaControlEmbeddedPanelElement::setPosition):
2265 (WebCore::MediaControlEmbeddedPanelElement::resetPosition):
2266 (WebCore::MediaControlFullscreenTimelineElement::defaultEventHandler):
2267 (WebCore::MediaControlsBlackBerry::updateCurrentTimeDisplay):
2268 * html/shadow/MediaControlsChromium.cpp:
2269 (WebCore::MediaControlsChromium::updateCurrentTimeDisplay):
2270 * html/track/InbandTextTrack.cpp:
2271 (WebCore::InbandTextTrack::addGenericCue):
2272 * inspector/InspectorCSSAgent.cpp:
2273 (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2274 * inspector/InspectorHistory.cpp:
2275 (WebCore::InspectorHistory::markUndoableState):
2276 * inspector/InspectorResourceAgent.cpp:
2277 (WebCore::InspectorResourceAgent::replayXHR):
2278 * page/ContextMenuController.cpp:
2279 (WebCore::ContextMenuController::contextMenuItemSelected):
2280 * page/DOMWindow.cpp:
2281 (WebCore::didAddStorageEventListener):
2282 * page/DragController.cpp:
2283 (WebCore::documentFragmentFromDragData):
2284 * page/EventHandler.cpp:
2285 (WebCore::EventHandler::dispatchDragEvent):
2286 (WebCore::EventHandler::keyEvent):
2287 (WebCore::EventHandler::handleTextInputEvent):
2289 (WebCore::Page::findStringMatchingRanges):
2290 * platform/efl/RenderThemeEfl.cpp:
2291 (WebCore::RenderThemeEfl::paintMediaSliderTrack):
2292 * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2293 (WebCore::MediaPlayerPrivate::percentLoaded):
2294 * platform/gtk/RenderThemeGtk.cpp:
2295 (WebCore::RenderThemeGtk::paintMediaSliderTrack):
2296 * platform/mac/PasteboardMac.mm:
2297 (WebCore::Pasteboard::getDataSelection):
2298 (WebCore::documentFragmentWithImageResource):
2299 (WebCore::Pasteboard::documentFragment):
2300 * platform/mac/WebVideoFullscreenHUDWindowController.mm:
2301 (-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
2302 (-[WebVideoFullscreenHUDWindowController setVolume:]):
2303 * platform/qt/RenderThemeQt.cpp:
2304 (WebCore::RenderThemeQt::paintMediaSliderTrack):
2305 * rendering/RenderNamedFlowThread.cpp:
2306 (WebCore::RenderNamedFlowThread::getRanges):
2307 * rendering/RenderThemeMac.mm:
2308 (WebCore::RenderThemeMac::paintMediaSliderTrack):
2309 * svg/SVGTRefElement.cpp:
2310 (WebCore::SVGTRefElement::detachTarget):
2311 * xml/XMLTreeViewer.cpp:
2312 (WebCore::XMLTreeViewer::transformDocumentToTreeView):
2313 * xml/parser/XMLDocumentParserLibxml2.cpp:
2314 (WebCore::XMLDocumentParser::endElementNs):
2315 * xml/parser/XMLDocumentParserQt.cpp:
2316 (WebCore::XMLDocumentParser::parseEndElement):
2318 2013-02-08 Vsevolod Vlasov <vsevik@chromium.org>
2320 Web Inspector: Introduce workspace provider/project type, encapsulate uri creation in SimpleWorkspaceProvider.
2321 https://bugs.webkit.org/show_bug.cgi?id=109282
2323 Reviewed by Alexander Pavlov.
2325 SimpleWorkspaceProvider now fully takes care of creating uri based on project/workspace provider type.
2326 This is the first step on the way to project-per-domain mode for non file system project types.
2327 Workspace is now partly aware of the possibility that several projects with the same type exist.
2328 Drive-by: ScriptsPanel now uses FileMapping to show anchor location properly.
2330 * inspector/front-end/DefaultScriptMapping.js:
2331 (WebInspector.DefaultScriptMapping):
2332 (WebInspector.DefaultScriptMapping.prototype.addScript):
2333 * inspector/front-end/ExtensionServer.js:
2334 (WebInspector.ExtensionServer.prototype._onGetPageResources):
2335 * inspector/front-end/FileMapping.js:
2336 (WebInspector.FileMapping.prototype.uriForURL):
2337 * inspector/front-end/FileSystemWorkspaceProvider.js:
2338 (WebInspector.FileSystemWorkspaceProvider.prototype.type):
2339 * inspector/front-end/JavaScriptSourceFrame.js:
2340 (WebInspector.JavaScriptSourceFrame.prototype._supportsEnabledBreakpointsWhileEditing):
2341 * inspector/front-end/LiveEditSupport.js:
2342 (WebInspector.LiveEditSupport):
2343 (WebInspector.LiveEditSupport.prototype.uiSourceCodeForLiveEdit):
2344 * inspector/front-end/ScriptSnippetModel.js:
2345 (WebInspector.ScriptSnippetModel):
2346 (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
2347 * inspector/front-end/ScriptsNavigator.js:
2348 (WebInspector.ScriptsNavigator.prototype._navigatorViewForUISourceCode):
2349 (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
2350 (WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet):
2351 (WebInspector.SnippetsNavigatorView.prototype._handleRemoveSnippet):
2352 * inspector/front-end/ScriptsPanel.js:
2353 (WebInspector.ScriptsPanel.prototype._addUISourceCode):
2354 (WebInspector.ScriptsPanel.prototype._projectWillReset):
2355 (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation):
2356 (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2357 (WebInspector.ScriptsPanel.prototype.set _fileRenamed):
2358 * inspector/front-end/SimpleWorkspaceProvider.js:
2359 (WebInspector.SimpleWorkspaceProvider):
2360 (WebInspector.SimpleWorkspaceProvider.uriForURL):
2361 (WebInspector.SimpleWorkspaceProvider.prototype.type):
2362 (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
2363 (WebInspector.SimpleWorkspaceProvider.prototype.addUniqueFileForURL):
2364 (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
2365 (WebInspector.SimpleWorkspaceProvider.prototype._uniqueURI):
2366 * inspector/front-end/Workspace.js:
2367 (WebInspector.WorkspaceProvider.prototype.type):
2368 (WebInspector.Project.prototype.type):
2369 (WebInspector.Project.prototype.isServiceProject):
2370 (WebInspector.Workspace.prototype.uiSourceCodeForOriginURL):
2371 (WebInspector.Workspace.prototype.uiSourceCodesForProjectType):
2372 (WebInspector.Workspace.prototype.projectsForType):
2373 * inspector/front-end/inspector.js:
2375 2013-02-08 ChangSeok Oh <shivamidow@gmail.com>
2377 [GTK][AC] GraphicsLayerClutter doesn't need to recalculate its position after changing anchor position.
2378 https://bugs.webkit.org/show_bug.cgi?id=109226
2380 Reviewed by Gustavo Noronha Silva.
2382 Clutter has a different coordinate system from mac port's, so we don't need to
2383 recalulate GraphicsLayer position after changing its anchor position.
2385 Covered by existing ac tests.
2387 * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2388 (WebCore::GraphicsLayerClutter::updateGeometry):
2390 2013-02-08 Mike West <mkwst@chromium.org>
2392 Migrate ExceptionCode ASSERTs in IDB to ASSERT_NO_EXCEPTION.
2393 https://bugs.webkit.org/show_bug.cgi?id=109266
2395 Reviewed by Jochen Eisinger.
2399 ExceptionCode ec = 0;
2400 methodThatGeneratesException(ec);
2403 is more clearly and succinctly written as:
2405 methodThatGeneratesException(ASSERT_NO_EXCEPTION);
2407 This patch replaces the occurances of the former in IDB code that never
2408 touch 'ec' again with the latter. No change in behavior should result
2409 from this refactoring.
2411 * Modules/indexeddb/IDBCursor.cpp:
2412 (WebCore::IDBCursor::advance):
2413 (WebCore::IDBCursor::continueFunction):
2414 (WebCore::IDBCursor::deleteFunction):
2415 These methods checked the value of the ExceptionCode without first
2416 initializing it to 0. Now the ExceptionCode is explicitly set to 0
2417 before doing potentially exception-generating work.
2418 (WebCore::IDBCursor::direction):
2419 * Modules/indexeddb/IDBObjectStore.cpp:
2421 * Modules/indexeddb/IDBTransaction.cpp:
2422 (WebCore::IDBTransaction::mode):
2423 Replace the above pattern with ASSERT_NO_EXCEPTION.
2425 2013-02-08 Mike West <mkwst@chromium.org>
2427 Migrate ExceptionCode ASSERTs in SVG to ASSERT_NO_EXCEPTION.
2428 https://bugs.webkit.org/show_bug.cgi?id=109267
2430 Reviewed by Jochen Eisinger.
2434 ExceptionCode ec = 0;
2435 methodThatGeneratesException(ec);
2438 is more clearly and succinctly written as:
2440 methodThatGeneratesException(ASSERT_NO_EXCEPTION);
2442 This patch replaces the occurances of the former in SVG code that never
2443 touch 'ec' again with the latter. No change in behavior should result
2444 from this refactoring.
2446 * svg/SVGLength.cpp:
2447 (WebCore::SVGLength::SVGLength):
2448 (WebCore::SVGLength::setValue):
2449 This method checked the value of the ExceptionCode without first
2450 initializing it to 0. Now it initializes before doing potentially
2451 exception-generating work.
2452 * rendering/style/SVGRenderStyle.h:
2453 (WebCore::SVGRenderStyle::initialBaselineShiftValue):
2454 (WebCore::SVGRenderStyle::initialKerning):
2455 (WebCore::SVGRenderStyle::initialStrokeDashOffset):
2456 (WebCore::SVGRenderStyle::initialStrokeWidth):
2457 * svg/SVGAnimatedLength.cpp:
2458 (WebCore::sharedSVGLength):
2459 (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
2460 (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
2461 * svg/SVGAnimatedLengthList.cpp:
2462 (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
2463 (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
2464 * svg/SVGTextContentElement.cpp:
2465 (WebCore::SVGTextContentElement::textLengthAnimated):
2466 * svg/animation/SVGSMILElement.cpp:
2467 (WebCore::constructQualifiedName):
2468 Replace the above pattern with ASSERT_NO_EXCEPTION.
2470 2013-02-08 Vsevolod Vlasov <vsevik@chromium.org>
2472 Web Inspector: Replace workspace with project in UISourceCode constructor.
2473 https://bugs.webkit.org/show_bug.cgi?id=109256
2475 Reviewed by Alexander Pavlov.
2477 Replaced workspace with project in UISourceCode constructor since every UISourceCode
2478 operation is delegated to project anyway.
2480 * inspector/front-end/UISourceCode.js:
2481 (WebInspector.UISourceCode):
2482 (WebInspector.UISourceCode.prototype.project):
2483 (WebInspector.UISourceCode.prototype.requestContent):
2484 (WebInspector.UISourceCode.prototype.requestOriginalContent):
2485 (WebInspector.UISourceCode.prototype._commitContent):
2486 (WebInspector.UISourceCode.prototype.searchInContent):
2487 * inspector/front-end/Workspace.js:
2488 (WebInspector.Project.prototype._fileAdded):
2489 (WebInspector.Project.prototype.requestFileContent):
2490 (WebInspector.Project.prototype.setFileContent):
2491 (WebInspector.Project.prototype.searchInFileContent):
2493 2013-02-08 Patrick Gansterer <paroga@webkit.org>
2495 Build fix for Windows after r141981.
2497 * platform/network/win/ResourceHandleWin.cpp:
2498 (WebCore::ResourceHandle::loadResourceSynchronously):
2500 2013-02-08 Sheriff Bot <webkit.review.bot@gmail.com>
2502 Unreviewed, rolling out r141695 and r141697.
2503 http://trac.webkit.org/changeset/141695
2504 http://trac.webkit.org/changeset/141697
2505 https://bugs.webkit.org/show_bug.cgi?id=109279
2507 broke on-disk buffering for http(s) media (Requested by philn
2510 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2511 (WebCore::MediaPlayerPrivateGStreamer::load):
2512 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2513 (MediaPlayerPrivateGStreamer):
2514 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2515 (webKitWebSrcGetProtocols):
2516 (webKitWebSrcSetUri):
2518 2013-02-08 Dan Carney <dcarney@google.com>
2520 [v8] isolate parameter added to all v8::peristent calls
2521 https://bugs.webkit.org/show_bug.cgi?id=109268
2523 Reviewed by Kentaro Hara.
2525 No new tests. No change in functionality.
2527 * bindings/scripts/CodeGeneratorV8.pm:
2528 (GenerateDomainSafeFunctionGetter):
2529 (GenerateNamedConstructorCallback):
2530 (GenerateImplementation):
2531 * bindings/scripts/test/V8/V8Float64Array.cpp:
2532 (WebCore::V8Float64Array::GetRawTemplate):
2533 * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2534 (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
2535 (WebCore::V8TestActiveDOMObject::GetRawTemplate):
2536 * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2537 (WebCore::V8TestCustomNamedGetter::GetRawTemplate):
2538 * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2539 (WebCore::V8TestEventConstructor::GetRawTemplate):
2540 * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2541 (WebCore::V8TestEventTarget::GetRawTemplate):
2542 * bindings/scripts/test/V8/V8TestException.cpp:
2543 (WebCore::V8TestException::GetRawTemplate):
2544 * bindings/scripts/test/V8/V8TestInterface.cpp:
2545 (WebCore::V8TestInterface::GetRawTemplate):
2546 * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2547 (WebCore::V8TestMediaQueryListListener::GetRawTemplate):
2548 * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2549 (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
2550 (WebCore::V8TestNamedConstructor::GetRawTemplate):
2551 * bindings/scripts/test/V8/V8TestNode.cpp:
2552 (WebCore::V8TestNode::GetRawTemplate):
2553 * bindings/scripts/test/V8/V8TestObj.cpp:
2554 (WebCore::V8TestObj::GetRawTemplate):
2555 * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
2556 (WebCore::V8TestOverloadedConstructors::GetRawTemplate):
2557 * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2558 (WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate):
2559 * bindings/v8/DOMWrapperMap.h:
2560 (WebCore::DOMWrapperMap::clear):
2561 * bindings/v8/DOMWrapperWorld.cpp:
2562 (WebCore::isolatedWorldWeakCallback):
2563 (WebCore::DOMWrapperWorld::makeContextWeak):
2564 * bindings/v8/NPV8Object.cpp:
2565 (WebCore::freeV8NPObject):
2566 (WebCore::npCreateV8ScriptObject):
2567 * bindings/v8/ScheduledAction.cpp:
2568 (WebCore::ScheduledAction::ScheduledAction):
2569 (WebCore::ScheduledAction::~ScheduledAction):
2570 * bindings/v8/ScopedPersistent.h:
2571 (WebCore::ScopedPersistent::ScopedPersistent):
2572 (WebCore::ScopedPersistent::set):
2573 (WebCore::ScopedPersistent::clear):
2574 * bindings/v8/ScriptWrappable.h:
2575 (WebCore::ScriptWrappable::setWrapper):
2576 (WebCore::ScriptWrappable::disposeWrapper):
2577 (WebCore::ScriptWrappable::weakCallback):
2578 * bindings/v8/V8Binding.cpp:
2579 (WebCore::createRawTemplate):
2580 * bindings/v8/V8Binding.h:
2582 * bindings/v8/V8GCController.cpp:
2584 (WebCore::V8GCController::gcPrologue):
2585 (WebCore::V8GCController::minorGCPrologue):
2586 * bindings/v8/V8GCController.h:
2588 * bindings/v8/V8HiddenPropertyName.cpp:
2589 (WebCore::V8HiddenPropertyName::createString):
2590 * bindings/v8/V8LazyEventListener.cpp:
2591 (WebCore::V8LazyEventListener::prepareListenerObject):
2592 * bindings/v8/V8NPObject.cpp:
2593 (WebCore::V8NPTemplateMap::dispose):
2594 (WebCore::npObjectGetProperty):
2595 (WebCore::createV8ObjectForNPObject):
2596 * bindings/v8/V8PerContextData.cpp:
2597 (WebCore::V8PerContextData::dispose):
2598 (WebCore::V8PerContextData::createWrapperFromCacheSlowCase):
2599 (WebCore::V8PerContextData::constructorForTypeSlowCase):
2600 * bindings/v8/V8ValueCache.cpp:
2601 (WebCore::makeExternalString):
2602 * bindings/v8/WrapperTypeInfo.h:
2603 (WebCore::WrapperConfiguration::configureWrapper):
2604 * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2605 (WebCore::V8HTMLDocument::wrapInShadowObject):
2606 * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2607 (WebCore::V8HTMLImageElementConstructor::GetTemplate):
2608 * bindings/v8/custom/V8InjectedScriptManager.cpp:
2609 (WebCore::WeakReferenceCallback):
2610 (WebCore::createInjectedScriptHostV8Wrapper):
2611 * bindings/v8/custom/V8LocationCustom.cpp:
2612 (WebCore::V8Location::reloadAccessorGetter):
2613 (WebCore::V8Location::replaceAccessorGetter):
2614 (WebCore::V8Location::assignAccessorGetter):
2616 2013-02-08 Kent Tamura <tkent@chromium.org>
2618 Adjust usage of ENABLE flags to enable whole content
2619 https://bugs.webkit.org/show_bug.cgi?id=109270
2621 Reviewed by Eric Seidel.
2623 Our common usage of ENABLE flags to enable whole content of files is:
2635 Fix files which have uncommon usage, and fix CodeGeneratorV8.pm so that
2636 it generates the common pattern. Note that CodeGeneratorJS.pm already
2637 generates code in this order.
2639 * bindings/scripts/CodeGeneratorV8.pm:
2640 (GenerateHeaderContentHeader):
2641 (GenerateImplementationContentHeader):
2642 * bindings/scripts/test/V8/V8TestCallback.cpp:
2643 * bindings/scripts/test/V8/V8TestCallback.h:
2644 * bindings/scripts/test/V8/V8TestInterface.cpp:
2645 * bindings/scripts/test/V8/V8TestInterface.h:
2646 * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2647 * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2648 * html/BaseMultipleFieldsDateAndTimeInputType.h:
2649 * html/ColorInputType.cpp:
2650 * html/ColorInputType.h:
2651 * html/DateInputType.cpp:
2652 * html/DateTimeInputType.cpp:
2653 * html/DateTimeInputType.h:
2654 * html/DateTimeLocalInputType.cpp:
2655 * html/HTMLAudioElement.cpp:
2656 * html/HTMLAudioElement.h:
2657 * html/HTMLDataListElement.cpp:
2658 * html/HTMLDialogElement.cpp:
2659 * html/HTMLDialogElement.h:
2660 * html/HTMLMediaElement.cpp:
2661 * html/HTMLMediaElement.h:
2662 * html/HTMLMeterElement.cpp:
2663 * html/HTMLProgressElement.cpp:
2664 * html/HTMLSourceElement.cpp:
2665 * html/HTMLSourceElement.h:
2666 * html/HTMLTrackElement.cpp:
2667 * html/HTMLTrackElement.h:
2668 * html/HTMLVideoElement.cpp:
2669 * html/HTMLVideoElement.h:
2670 * html/MonthInputType.cpp:
2671 * html/TimeInputType.cpp:
2672 * html/WeekInputType.cpp:
2673 * html/shadow/DateTimeFieldElement.h:
2674 * html/shadow/DetailsMarkerControl.cpp:
2675 * html/shadow/MeterShadowElement.cpp:
2676 * html/shadow/ProgressShadowElement.cpp:
2677 * rendering/RenderDetailsMarker.cpp:
2678 * rendering/RenderInputSpeech.cpp:
2679 * rendering/RenderMeter.cpp:
2680 * rendering/RenderProgress.cpp:
2682 2013-02-08 Mike West <mkwst@chromium.org>
2684 Replace ExceptionCode assertions with ASSERT_NO_EXCEPTION macro.
2685 https://bugs.webkit.org/show_bug.cgi?id=109044
2687 Reviewed by Darin Adler.
2691 ExceptionCode ec = 0;
2692 methodThatGeneratesException(ec);
2695 is more clearly and succinctly written as:
2697 methodThatGeneratesException(ASSERT_NO_EXCEPTION);
2699 This patch replaces the occurances of the former that never touch 'ec'
2700 again with the latter. It does the same for 'ASSERT(ec == 0);' (and, as
2701 a drive-by, replaces 'ASSERT(ec == 0)' with 'ASSERT(!ec)' in places
2702 where it does indeed matter that 'ec' get set properly.
2704 No change in behavior should result from this refactoring.
2706 * dom/ContainerNode.cpp:
2707 (WebCore::ContainerNode::takeAllChildrenFrom):
2709 (WebCore::Document::setTitle):
2710 * dom/MessagePort.cpp:
2711 (WebCore::MessagePort::dispatchMessages):
2712 (WebCore::MessagePort::disentanglePorts):
2713 * editing/DeleteButtonController.cpp:
2714 (WebCore::enclosingDeletableElement):
2715 (WebCore::DeleteButtonController::createDeletionUI):
2716 Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
2717 (WebCore::DeleteButtonController::show):
2718 Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
2719 * editing/EditorCommand.cpp:
2720 (WebCore::unionDOMRanges):
2721 * editing/ReplaceNodeWithSpanCommand.cpp:
2722 (WebCore::swapInNodePreservingAttributesAndChildren):
2723 * editing/ReplaceSelectionCommand.cpp:
2724 (WebCore::ReplacementFragment::ReplacementFragment):
2725 (WebCore::ReplacementFragment::removeNode):
2726 (WebCore::ReplacementFragment::insertNodeBefore):
2727 (WebCore::ReplacementFragment::insertFragmentForTestRendering):
2728 (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
2729 (WebCore::ReplaceSelectionCommand::insertAsListItems):
2730 * editing/SplitTextNodeCommand.cpp:
2731 (WebCore::SplitTextNodeCommand::doUnapply):
2732 * editing/TextIterator.cpp:
2733 (WebCore::CharacterIterator::range):
2734 (WebCore::BackwardsCharacterIterator::range):
2735 (WebCore::TextIterator::rangeFromLocationAndLength):
2736 (WebCore::collapsedToBoundary):
2737 * editing/htmlediting.cpp:
2738 (WebCore::createTabSpanElement):
2739 * editing/mac/EditorMac.mm:
2740 (WebCore::Editor::fontForSelection):
2741 (WebCore::Editor::fontAttributesForSelectionStart):
2742 * editing/markup.cpp:
2743 (WebCore::createMarkup):
2744 (WebCore::trimFragment):
2745 (WebCore::createFragmentFromMarkupWithContext):
2746 (WebCore::fillContainerFromString):
2747 (WebCore::createFragmentFromText):
2748 (WebCore::createFragmentFromNodes):
2749 * html/ColorInputType.cpp:
2750 (WebCore::ColorInputType::createShadowSubtree):
2751 Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
2752 * html/HTMLOptionsCollection.cpp:
2753 (WebCore::HTMLOptionsCollection::add):
2754 Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
2755 * html/HTMLTextAreaElement.cpp:
2756 (WebCore::HTMLTextAreaElement::updatePlaceholderText):
2757 * html/HTMLTextFormControlElement.cpp:
2758 (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
2759 (WebCore::HTMLTextFormControlElement::setInnerTextValue):
2760 * html/TextFieldInputType.cpp:
2761 (WebCore::TextFieldInputType::updatePlaceholderText):
2762 * html/ValidationMessage.cpp:
2763 (WebCore::ValidationMessage::buildBubbleTree):
2764 * html/shadow/MediaControlElementTypes.cpp:
2765 (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
2766 * inspector/InspectorPageAgent.cpp:
2767 (WebCore::InspectorPageAgent::getCookies):
2768 * inspector/InspectorStyleSheet.cpp:
2769 (WebCore::InspectorStyleSheet::addRule):
2770 * loader/appcache/ApplicationCacheHost.cpp:
2771 (WebCore::ApplicationCacheHost::dispatchDOMEvent):
2772 * page/DOMSelection.cpp:
2773 (WebCore::DOMSelection::deleteFromDocument):
2774 * page/DragController.cpp:
2775 (WebCore::prepareClipboardForImageDrag):
2776 * rendering/RenderTextControl.cpp:
2777 (WebCore::RenderTextControl::visiblePositionForIndex):
2778 Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
2780 2013-02-08 Alexei Filippov <alph@chromium.org>
2782 Web Inspector: disable profile type switching while profile in progress
2783 https://bugs.webkit.org/show_bug.cgi?id=109178
2785 Reviewed by Yury Semikhatsky.
2787 Disables profile type selection controls when a profiling session
2790 * inspector/front-end/HeapSnapshotView.js:
2791 (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
2792 * inspector/front-end/ProfileLauncherView.js:
2793 (WebInspector.ProfileLauncherView.prototype._updateControls):
2794 * inspector/front-end/ProfilesPanel.js:
2795 (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
2797 2013-02-08 Ilya Tikhonovsky <loislo@chromium.org>
2799 Web Inspector: Native Memory Instrumentation: adjust chunk transfer size for better speed.
2800 https://bugs.webkit.org/show_bug.cgi?id=109263
2802 Reviewed by Yury Semikhatsky.
2804 The chunk size is changed from 100 to 10000.
2805 addString counts only first 256 symbols of the string.o
2807 * inspector/HeapGraphSerializer.cpp:
2808 (WebCore::HeapGraphSerializer::pushUpdateIfNeeded):
2809 (WebCore::HeapGraphSerializer::addString):
2810 * inspector/front-end/NativeMemorySnapshotView.js:
2812 2013-02-08 Kentaro Hara <haraken@chromium.org>
2814 Support a relatedTarget attribute on focus/blur events
2815 https://bugs.webkit.org/show_bug.cgi?id=109176
2817 Reviewed by Ojan Vafai.
2819 In bug 76216, we supported a relatedTarget attribute on
2820 focusin/focusout events. We should also support it on focus/blur events.
2822 See http://lists.w3.org/Archives/Public/www-dom/2012OctDec/0061.html
2823 for the www-dom discussion.
2825 Test: fast/dom/shadow/shadow-boundary-events.html
2826 fast/events/related-target-focusevent.html
2828 * dom/EventDispatchMediator.cpp:
2829 (WebCore::FocusEventDispatchMediator::create):
2830 (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
2831 (WebCore::BlurEventDispatchMediator::create):
2832 (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
2833 * dom/EventDispatchMediator.h:
2834 (FocusEventDispatchMediator):
2835 (BlurEventDispatchMediator):
2837 (WebCore::Node::dispatchFocusInEvent):
2838 (WebCore::Node::dispatchFocusOutEvent):
2839 (WebCore::Node::dispatchFocusEvent):
2840 (WebCore::Node::dispatchBlurEvent):
2842 2013-02-07 Yury Semikhatsky <yurys@chromium.org>
2844 Web Inspector: reduce number of native memory instrumentation categories
2845 https://bugs.webkit.org/show_bug.cgi?id=109146
2847 Reviewed by Pavel Feldman.
2849 Merged some of memory instrumentation categories.
2851 * dom/WebCoreMemoryInstrumentation.cpp:
2853 * inspector/front-end/NativeMemorySnapshotView.js:
2854 (WebInspector.MemoryBlockViewProperties._initialize):
2855 * platform/PlatformMemoryInstrumentation.cpp:
2858 2013-02-07 Mike West <mkwst@chromium.org>
2860 <iframe seamless> should avoid vertical scrollbars during the initial layout passes.
2861 https://bugs.webkit.org/show_bug.cgi?id=87707
2863 Reviewed by Eric Seidel.
2865 Seamless documents currently render incorrectly when their content fills
2866 the width of the container into which they're placed. Because FrameView
2867 assumes that the container's size is properly set before the first pass
2868 of layout, vertical scrollbars are incorrectly forced onto seamless
2869 content, because seamless sets the container's height to 0 before
2870 handing it off to FrameView for layout. The scrollbars make the
2871 available width for the seamless document ~15px smaller than it should
2872 be, resulting in content getting bumped to the next line.
2874 This patch special-cases FrameView::calculateScrollbarModesForLayout in
2875 order to force scrollbars off for seamless documents with a full visible
2876 height of 0px. Once the layout pass has grabbed the content height and
2877 applied it to the visible height, scrollbars will again be applicable.
2879 The change should be covered by rebaselines for the newly-passing
2880 results in fast/frame/seamless-{float,inline}.html
2882 * page/FrameView.cpp:
2883 (WebCore::FrameView::calculateScrollbarModesForLayout):
2884 If we're rendering a seamless document, and the full visible height
2885 is 0, and the vertical scrollbar would otherwise be ScrollbarAuto,
2886 then force ScrollbarAlwaysOff.
2888 2013-02-07 Kent Tamura <tkent@chromium.org>
2890 document.activeElement should not return a non-focusable element
2891 https://bugs.webkit.org/show_bug.cgi?id=86707
2893 Reviewed by Hajime Morita.
2895 This is based on a patch by Arpita Bahuguna.
2897 Test: fast/dom/HTMLDocument/set-focus-on-valid-element.html
2900 (WebCore::Document::setFocusedNode):
2901 Added check for verifying that the node to be focused is
2902 focusable. However, this check should be skipped for HTMLPlugInElement
2903 because it has special behavior.
2905 2013-02-07 Vladislav Kaznacheev <kaznacheev@chromium.org>
2907 Web Inspector: Fix front-end compilation warnings related to WebInspector.SidebarPane
2908 https://bugs.webkit.org/show_bug.cgi?id=109259
2910 Reviewed by Vsevolod Vlasov.
2912 * inspector/front-end/DOMBreakpointsSidebarPane.js:
2913 (WebInspector.DOMBreakpointsSidebarPane.Proxy):
2914 * inspector/front-end/SidebarPane.js:
2916 2013-02-07 Kentaro Hara <haraken@chromium.org>
2918 [V8] enum V8HiddenPropertyCreationType is not used
2919 https://bugs.webkit.org/show_bug.cgi?id=109250
2921 Reviewed by Adam Barth.
2923 V8HiddenPropertyCreationType is always NewSymbol. We can remove the enum.
2925 No tests. No change in behavior.
2927 * bindings/v8/V8HiddenPropertyName.cpp:
2928 (WebCore::hiddenReferenceName):
2929 * bindings/v8/V8HiddenPropertyName.h:
2932 2013-02-07 Sheriff Bot <webkit.review.bot@gmail.com>
2934 Unreviewed, rolling out r142212.
2935 http://trac.webkit.org/changeset/142212
2936 https://bugs.webkit.org/show_bug.cgi?id=109255
2938 Causes ASSERT(!m_installed) on launch (Requested by smfr on
2942 * platform/MemoryPressureHandler.cpp:
2944 (WebCore::MemoryPressureHandler::respondToMemoryPressure):
2945 * platform/MemoryPressureHandler.h:
2946 (MemoryPressureHandler):
2947 * platform/mac/MemoryPressureHandlerMac.mm:
2948 (WebCore::MemoryPressureHandler::respondToMemoryPressure):
2950 2013-02-07 Hanyee Kim <choco@company100.net>
2952 NamedFlowCollection should be a ContextDestructionObserver
2953 https://bugs.webkit.org/show_bug.cgi?id=99239
2955 Reviewed by Adam Barth
2957 This patch removes the raw pointer of Document in NamedFlowCollection.
2958 It could be replaced with ContextDestructionObserver.
2959 ContextDestructionObserver has the pointer and clears the pointer
2960 automatically when the document is destroyed.
2963 (WebCore::Document::~Document):
2964 * dom/NamedFlowCollection.cpp:
2965 (WebCore::NamedFlowCollection::NamedFlowCollection):
2966 (WebCore::NamedFlowCollection::ensureFlowWithName):
2967 (WebCore::NamedFlowCollection::discardNamedFlow):
2968 (WebCore::NamedFlowCollection::document):
2970 * dom/NamedFlowCollection.h:
2971 (NamedFlowCollection):
2973 2013-02-07 Dean Jackson <dino@apple.com>
2975 Followup review suggestions from Alexey Proskuryakov on
2976 https://bugs.webkit.org/show_bug.cgi?id=109215
2978 Don't provide a charset on embedded SVG, especially
2979 with incorrect syntax :)
2981 * css/mediaControlsQuickTime.css:
2982 (video::-webkit-media-controls-toggle-closed-captions-button):
2983 (video::-webkit-media-controls-closed-captions-track-list li.selected):
2984 (video::-webkit-media-controls-closed-captions-track-list li.selected:hover):
2986 2013-02-07 Seulgi Kim <seulgikim@company100.net>
2988 [Gtk] RunLoop::run shuold run current thread's run loop.
2989 https://bugs.webkit.org/show_bug.cgi?id=107887
2991 Reviewed by Martin Robinson.
2993 Currently, RunLoop in Gtk can use just main thread's event loop.
2994 But the other ports are implemented to use RunLoop in sub threads.
2996 This patch makes RunLoop constructor create new context, not use default
2998 But in the main thread still uses default context to use main event loop
2999 since there is some codes using glib directly (e.g. in
3000 LayerTreeHostGtk::scheduleLayerFlush).
3002 No new tests. There is no case that uses RunLoop in off the main thread
3005 * platform/gtk/RunLoopGtk.cpp:
3006 (WebCore::RunLoop::RunLoop):
3007 (WebCore::RunLoop::run):
3009 2013-02-07 Kentaro Hara <haraken@chromium.org>
3011 [V8] Move V8DOMWrapper::setNamedHiddenReference() to V8HiddenPropertyName.h
3012 https://bugs.webkit.org/show_bug.cgi?id=109186
3014 Reviewed by Adam Barth.
3016 V8HiddenPropertyName.h is a right place for setNamedHiddenReference().
3018 No tests. No change in behavior.
3020 * bindings/scripts/CodeGeneratorV8.pm:
3021 (GenerateNormalAttrGetter):
3022 * bindings/scripts/test/V8/V8TestObj.cpp:
3023 (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter):
3024 * bindings/v8/V8DOMWrapper.cpp:
3025 * bindings/v8/V8DOMWrapper.h:
3027 * bindings/v8/V8HiddenPropertyName.cpp:
3028 (WebCore::V8HiddenPropertyName::hiddenReferenceName):
3029 (WebCore::V8HiddenPropertyName::setNamedHiddenReference):
3031 * bindings/v8/V8HiddenPropertyName.h:
3032 (V8HiddenPropertyName):
3033 (WebCore::V8HiddenPropertyName::V8HiddenPropertyName):
3034 * bindings/v8/custom/V8MessageChannelCustom.cpp:
3035 (WebCore::V8MessageChannel::constructorCallbackCustom):
3036 * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3037 (WebCore::toV8Object):
3039 2013-02-07 Elliott Sprehn <esprehn@chromium.org>
3041 getComputedStyle() doesn't report intermediate values during a transition of a pseudo element
3042 https://bugs.webkit.org/show_bug.cgi?id=106535
3044 Reviewed by Ojan Vafai.
3046 Element::computedStyle and CSSComputedStyleDeclaration::getPropertyCSSValue
3047 should use the PseudoElement and it's renderer if they exist so that
3048 querying the computed style while an animation is running returns
3049 the intermediate values.
3051 No new tests, updated existing tests.
3053 * css/CSSComputedStyleDeclaration.cpp:
3054 (WebCore::CSSComputedStyleDeclaration::styledNode): Added, returns either the PseudoElement or the Node.
3055 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Updated to use styledNode.
3056 * css/CSSComputedStyleDeclaration.h:
3057 (CSSComputedStyleDeclaration):
3059 (WebCore::Element::computedStyle): Check the PseudoElement, not just the cached pseudo style.
3060 * dom/ElementRareData.h:
3061 (WebCore::ElementRareData::pseudoElement): Remove ASSERT_NOT_REACHED so passing other pseudos returns 0.
3063 2013-02-07 Mark Lam <mark.lam@apple.com>
3065 Add a comment about how the SQLTransaction state machine works.
3066 https://bugs.webkit.org/show_bug.cgi?id=109243.
3068 Rubber stamped by Anders Carlsson.
3072 * Modules/webdatabase/SQLTransactionBackend.cpp:
3074 2013-02-06 Gavin Barraclough <barraclough@apple.com>
3076 PluginProcess should quit immediately if idle in response to low-memory notifications
3077 https://bugs.webkit.org/show_bug.cgi?id=109103
3078 <rdar://problem/12679827>
3080 Reviewed by Darin Adler.
3082 This patch allows a process to set a custom callback for low memory warnings
3083 (defaulting to the current behaviour, as implemented in releaseMemory).
3085 MemoryPressureHandler::install is currently used for two purposes - it is
3086 called when first initializing a low memory handler for a process, and also
3087 used to reinstall the handler (on a delay) after the notification has occured.
3088 Since reinstallation doesn't change the callback, split these behaviours out -
3089 MemoryPressureHandler::initialize is added to initialization, and accepts a
3090 custom callback, install in made private.
3093 - Added export for releaseMemory.
3094 * platform/MemoryPressureHandler.cpp:
3095 (WebCore::MemoryPressureHandler::releaseMemory):
3096 - Added null implementation for non-Mac builds.
3097 * platform/MemoryPressureHandler.h:
3098 (WebCore::MemoryPressureHandler::initialize):
3099 - distinguish initialization from reinstallations, allow handler to be set.
3100 (MemoryPressureHandler):
3101 - Added m_lowMemoryHandler function pointer member variable.
3102 * platform/mac/MemoryPressureHandlerMac.mm:
3103 (WebCore::MemoryPressureHandler::respondToMemoryPressure):
3104 - Call m_lowMemoryHandler instead of releaseMemory.
3106 2013-02-07 Kentaro Hara <haraken@chromium.org>
3108 [V8] #ifndef NDEBUG is redundant for assertContextHasCorrectPrototype()
3109 https://bugs.webkit.org/show_bug.cgi?id=109167
3111 Reviewed by Andreas Kling.
3113 Given that assertContextHasCorrectPrototype() is anyway empty in a release
3114 build, we don't need to surround it with #ifndef NDEBUG.
3116 No tests. No change in behavior.
3118 * bindings/v8/DOMWrapperWorld.cpp:
3119 (WebCore::DOMWrapperWorld::assertContextHasCorrectPrototype):
3120 * bindings/v8/DOMWrapperWorld.h:
3122 (WebCore::DOMWrapperWorld::isolated):
3124 2013-02-07 Alexei Svitkine <asvitkine@chromium.org>
3126 Chromium: Hang parsing bidi control chars on Mac OS X 10.6
3127 https://bugs.webkit.org/show_bug.cgi?id=108877
3129 This was broken a while ago by:
3130 https://bugs.webkit.org/show_bug.cgi?id=83045
3132 On 10.6, CoreText will not produce any runs covering the
3133 Unicode BiDi RTL mark control char, which causes an infinite
3134 loop in ComplexTextController::indexOfCurrentRun() due to no
3135 run covering the character at offset 0.
3137 This patch fixes that issue by finding the earliest run
3138 explicitly via the minimum stringBegin() index instead of
3139 relying on a run existing that covers offset 0.
3141 Fixes hang on many BiDi wikipedia pages on Chromium/Mac10.6.
3142 Chromium bug: http://crbug.com/167844
3144 New test in the same style as the harfbuzz-buffer-overrun.html
3145 test (in the same folder).
3147 Reviewed by Eric Seidel.
3149 Test: fast/text/international/rtl-mark.html
3151 * platform/graphics/mac/ComplexTextController.cpp:
3152 (WebCore::ComplexTextController::indexOfCurrentRun):
3154 2013-02-07 Kentaro Hara <haraken@chromium.org>
3156 Implement FocusEvent constructor
3157 https://bugs.webkit.org/show_bug.cgi?id=109170
3159 Reviewed by Adam Barth.
3161 Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
3163 FocusEvent constructor should be implemented under a DOM4_EVENTS_CONSTRUCTOR
3164 flag, which is enabled on Chromium and Safari.
3166 Test: fast/events/constructors/focus-event-constructor.html
3168 * dom/FocusEvent.cpp:
3169 (WebCore::FocusEventInit::FocusEventInit):
3171 (WebCore::FocusEvent::FocusEvent):
3175 (WebCore::FocusEvent::create):
3177 * dom/FocusEvent.idl:
3178 * page/DOMWindow.idl:
3180 2013-02-07 Elliott Sprehn <esprehn@chromium.org>
3182 HTML parser should queue MutationRecords for its operations
3183 https://bugs.webkit.org/show_bug.cgi?id=89351
3185 Reviewed by Eric Seidel.
3187 Generate mutation records inside the parser. This is done by using a
3188 ChildListMutationScope in the ContainerNode::parser* methods and then
3189 adding delivery before each <script> element would be processed by
3192 Test: fast/dom/MutationObserver/parser-mutations.html
3194 * dom/ContainerNode.cpp:
3195 (WebCore::ContainerNode::takeAllChildrenFrom):
3196 (WebCore::ContainerNode::parserInsertBefore):
3197 (WebCore::ContainerNode::parserRemoveChild):
3198 (WebCore::ContainerNode::parserAppendChild):
3199 * html/parser/HTMLScriptRunner.cpp:
3200 (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
3201 (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
3202 (WebCore::HTMLScriptRunner::execute):
3203 (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
3204 (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets):
3205 (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
3206 (WebCore::HTMLScriptRunner::runScript):
3208 2013-02-07 Kentaro Hara <haraken@chromium.org>
3210 Fix FIXMEs in WindowFeatures.h
3211 https://bugs.webkit.org/show_bug.cgi?id=109151
3213 Reviewed by Adam Barth.
3215 1. // FIXME: We can delete this constructor once V8 showModalDialog is
3216 // changed to use DOMWindow.
3218 This FIXME is not right. The WindowFeatures() constructor is used by
3219 other ports too (e.g. WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp).
3220 So we should remove the FIXME.
3222 2. // FIXME: We can make these functions private non-member functions
3223 // once V8 showModalDialog is changed to use DOMWindow.
3225 Given that V8 now uses DOMWindow in showModalDialog(), we can make the
3228 No tests. No change in behavior.
3230 * page/WindowFeatures.h:
3232 (WebCore::WindowFeatures::WindowFeatures):
3235 2013-02-07 Adam Barth <abarth@webkit.org>
3237 fast/parser/document-write-noscript.html fails for threaded HTML parser
3238 https://bugs.webkit.org/show_bug.cgi?id=109237
3240 Reviewed by Eric Seidel.
3242 If there are multiple calls to document.write in an external script, we
3243 need to wait for them all to complete before invalidating the
3244 speculative tokens. Instead of doing this when we unwind the
3245 document.write call stack, we do this when we're about to resume
3246 parsing after script execution.
3248 Test: fast/parser/document-write-basic.html
3250 * html/parser/HTMLDocumentParser.cpp:
3251 (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
3252 (WebCore::HTMLDocumentParser::insert):
3253 (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
3255 2013-02-07 Lamarque V. Souza <Lamarque.Souza@basyskom.com>
3257 Fix build when compiling with css3-text and css3-conditional-rules feature flags enabled.
3258 https://bugs.webkit.org/show_bug.cgi?id=109217
3260 Reviewed by Benjamin Poulain.
3262 * css/InspectorCSSOMWrappers.cpp:
3263 (WebCore::InspectorCSSOMWrappers::collect):
3265 2013-02-07 Keishi Hattori <keishi@webkit.org>
3267 REGRESSION (r140778): Calendar Picker doesn't open when the element has the required attribute
3268 https://bugs.webkit.org/show_bug.cgi?id=109136
3270 Reviewed by Kent Tamura.
3272 Calendar picker was using the "Clear" button to calculate the window width.
3273 Since it doesn't exist when the input element has a required attribute,
3274 it was throwing an error. This patch fixes the width calculating logic.
3276 Tests: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required-ar.html
3277 platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required.html
3279 * Resources/pagepopups/calendarPicker.css:
3280 (.today-clear-area):
3281 * Resources/pagepopups/calendarPicker.js:
3282 (CalendarPicker.prototype.fixWindowSize): Fixing the logic to calculate
3283 the width. We don't want to use clear button because it doesn't exist
3284 when a value is required.
3286 2013-02-07 Terry Anderson <tdanderson@chromium.org>
3288 Non-scrollable divs and non-scrollable iframes can scroll with touch
3289 https://bugs.webkit.org/show_bug.cgi?id=109087
3291 Reviewed by Eric Seidel.
3293 Tests: fast/events/touch/gesture/touch-gesture-noscroll-div.html
3294 fast/events/touch/gesture/touch-gesture-noscroll-iframe.html
3296 When finding a candidate for a scrollable node in
3297 EventHandler::handleGestureScrollUpdate(), select the document node
3298 if it is reached before any scrollable element when walking up the DOM
3299 tree. Also ensure that calling RenderLayer::scrollBy() for a document
3300 node does not result in scrolling if the element is not scrollable.
3302 * page/EventHandler.cpp:
3303 (WebCore::closestScrollableNodeCandidate):
3304 (WebCore::EventHandler::handleGestureScrollUpdate):
3305 * rendering/RenderLayer.cpp:
3306 (WebCore::RenderLayer::scrollBy):
3308 2013-02-07 Mark Lam <mark.lam@apple.com>
3310 Introduce SQLTransactionBackend and SQLTransactionBackendSync [Part 2].
3311 https://bugs.webkit.org/show_bug.cgi?id=109109.
3313 Reviewed by Anders Carlsson.
3315 Adding back the new SQLTransaction and SQLTransactionSync files.
3319 * Modules/webdatabase/SQLTransaction.cpp: Added.
3320 (WebCore::SQLTransaction::create):
3321 (WebCore::SQLTransaction::SQLTransaction):
3322 (WebCore::SQLTransaction::from):
3323 * Modules/webdatabase/SQLTransaction.h: Added.
3325 * Modules/webdatabase/SQLTransactionSync.cpp: Added.
3326 (WebCore::SQLTransactionSync::create):
3327 (WebCore::SQLTransactionSync::SQLTransactionSync):
3328 (WebCore::SQLTransactionSync::from):
3329 * Modules/webdatabase/SQLTransactionSync.h: Added.
3330 (SQLTransactionSync):
3332 2013-02-07 Mark Lam <mark.lam@apple.com>
3334 Introduce SQLTransactionBackend and SQLTransactionBackendSync.
3335 https://bugs.webkit.org/show_bug.cgi?id=109109.
3337 Reviewed by Anders Carlsson.
3339 - Renamed SQLTransaction and SQLTransactionSync to SQLTransactionBackend
3340 and SQLTransactionBackendSync respectively.
3341 - Added back SQLTransaction and SQLTransactionSync as new files, and have
3342 their classes extends their respective backends. This is a stop gap
3343 measure to keep things working until the front-end and back-end can be
3345 Note: these files will be committed in a subsequent commit to ensure
3346 that the patching goes smoothly.
3347 - Where needed, I made use of new SQLTransaction::from() and
3348 SQLTransactionSync::from() static methods that "get" the front-end
3349 transactions from the back-ends. This is also a stop gap measure to
3350 keep things working until the proper refactoring is complete.
3351 - Fixed up pre-existing style checker violations that are now detected
3352 on code that were touched during my renaming.
3353 - Added the back-end files to all the build files.
3358 * GNUmakefile.list.am:
3359 * Modules/webdatabase/Database.cpp:
3360 (WebCore::Database::scheduleTransactionStep):
3361 * Modules/webdatabase/Database.h:
3363 * Modules/webdatabase/DatabaseBackend.h:
3365 * Modules/webdatabase/DatabaseTask.cpp:
3366 (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::DatabaseTransactionTask):
3367 * Modules/webdatabase/DatabaseTask.h:
3368 (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::create):
3369 (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::transaction):
3370 (DatabaseBackendAsync::DatabaseTransactionTask):
3371 * Modules/webdatabase/SQLTransaction.cpp: Removed.
3372 * Modules/webdatabase/SQLTransaction.h: Removed.
3373 * Modules/webdatabase/SQLTransactionBackend.cpp: Copied from Source/WebCore/Modules/webdatabase/SQLTransaction.cpp.
3374 (WebCore::SQLTransactionBackend::SQLTransactionBackend):
3375 (WebCore::SQLTransactionBackend::~SQLTransactionBackend):
3376 (WebCore::SQLTransactionBackend::executeSQL):
3377 (WebCore::SQLTransactionBackend::enqueueStatement):
3378 (WebCore::SQLTransactionBackend::debugStepName):
3379 (WebCore::SQLTransactionBackend::checkAndHandleClosedOrInterruptedDatabase):
3380 (WebCore::SQLTransactionBackend::performNextStep):
3381 (WebCore::SQLTransactionBackend::performPendingCallback):
3382 (WebCore::SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown):
3383 (WebCore::SQLTransactionBackend::acquireLock):
3384 (WebCore::SQLTransactionBackend::lockAcquired):
3385 (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
3386 (WebCore::SQLTransactionBackend::deliverTransactionCallback):
3387 (WebCore::SQLTransactionBackend::scheduleToRunStatements):
3388 (WebCore::SQLTransactionBackend::runStatements):
3389 (WebCore::SQLTransactionBackend::getNextStatement):
3390 (WebCore::SQLTransactionBackend::runCurrentStatement):
3391 (WebCore::SQLTransactionBackend::handleCurrentStatementError):
3392 (WebCore::SQLTransactionBackend::deliverStatementCallback):
3393 (WebCore::SQLTransactionBackend::deliverQuotaIncreaseCallback):
3394 (WebCore::SQLTransactionBackend::postflightAndCommit):
3395 (WebCore::SQLTransactionBackend::deliverSuccessCallback):
3396 (WebCore::SQLTransactionBackend::cleanupAfterSuccessCallback):
3397 (WebCore::SQLTransactionBackend::handleTransactionError):
3398 (WebCore::SQLTransactionBackend::deliverTransactionErrorCallback):
3399 (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
3400 * Modules/webdatabase/SQLTransactionBackend.h: Copied from Source/WebCore/Modules/webdatabase/SQLTransaction.h.
3401 (SQLTransactionBackend):
3402 * Modules/webdatabase/SQLTransactionBackendSync.cpp: Copied from Source/WebCore/Modules/webdatabase/SQLTransactionSync.cpp.
3403 (WebCore::SQLTransactionBackendSync::SQLTransactionBackendSync):
3404 (WebCore::SQLTransactionBackendSync::~SQLTransactionBackendSync):
3405 (WebCore::SQLTransactionBackendSync::executeSQL):
3406 (WebCore::SQLTransactionBackendSync::begin):
3407 (WebCore::SQLTransactionBackendSync::execute):
3408 (WebCore::SQLTransactionBackendSync::commit):
3409 (WebCore::SQLTransactionBackendSync::rollback):
3410 * Modules/webdatabase/SQLTransactionBackendSync.h: Copied from Source/WebCore/Modules/webdatabase/SQLTransactionSync.h.
3411 (SQLTransactionBackendSync):
3412 * Modules/webdatabase/SQLTransactionCoordinator.cpp:
3413 (WebCore::getDatabaseIdentifier):
3414 (WebCore::SQLTransactionCoordinator::processPendingTransactions):
3415 (WebCore::SQLTransactionCoordinator::acquireLock):
3416 (WebCore::SQLTransactionCoordinator::releaseLock):
3417 (WebCore::SQLTransactionCoordinator::shutdown):
3418 * Modules/webdatabase/SQLTransactionCoordinator.h:
3419 (SQLTransactionCoordinator):
3420 (WebCore::SQLTransactionCoordinator::SQLTransactionCoordinator):
3422 * Modules/webdatabase/SQLTransactionSync.cpp: Removed.
3423 * Modules/webdatabase/SQLTransactionSync.h: Removed.